OSDN Git Service

soc: imx: gpc: fix domain_index sanity check issue
authorDong Aisheng <aisheng.dong@nxp.com>
Thu, 23 Mar 2017 04:53:20 +0000 (12:53 +0800)
committerShawn Guo <shawnguo@kernel.org>
Fri, 24 Mar 2017 05:42:01 +0000 (13:42 +0800)
commit15c3de4e188b567ab60dbff674002a7f4380af6a
tree2ce26206620aef46a3bb42cf97d5c9bdbc19d58c
parent3a317f523570adfc9c5bf6d65dc4f831dada97b9
soc: imx: gpc: fix domain_index sanity check issue

ARRAY_SIZE(imx_gpc_domains) represents all power domains supported
by different SoCs. Driver should use SoC specific of_id_data->num_domains
instead to do power domain index sanity check.
e.g. MX6Q supports two power domains while MX6SL supports three.

Fixes: 721cabf6c660 ("soc: imx: move PGC handling to a new GPC driver")
Acked-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
drivers/soc/imx/gpc.c