summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/cpuidle34xx.c
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2012-05-04 19:18:40 +0200
committerKevin Hilman <khilman@ti.com>2012-05-04 14:07:10 -0700
commitdaa37cee791722711bf15b9635d007014e73ad3d (patch)
tree4728b4f12bed175af600d9c1f2ed44117c1de146 /arch/arm/mach-omap2/cpuidle34xx.c
parent34fd57bffe60807f5639fc8bbe7a46ce97e45f50 (diff)
downloadblackbird-op-linux-daa37cee791722711bf15b9635d007014e73ad3d.tar.gz
blackbird-op-linux-daa37cee791722711bf15b9635d007014e73ad3d.zip
ARM: OMAP3: cpuidle - check the powerdomain lookup
At init time, check the powerdomains lookup is successful otherwise exit the cpuidle driver init function with -ENODEV like what is done for the omap3 cpuidle driver. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: Jean Pihet <j-pihet@ti.com> Tested-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/cpuidle34xx.c')
-rw-r--r--arch/arm/mach-omap2/cpuidle34xx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
index f682e170325a..207bc1c7759f 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -363,6 +363,9 @@ int __init omap3_idle_init(void)
per_pd = pwrdm_lookup("per_pwrdm");
cam_pd = pwrdm_lookup("cam_pwrdm");
+ if (!mpu_pd || !core_pd || !per_pd || !cam_pd)
+ return -ENODEV;
+
cpuidle_register_driver(&omap3_idle_driver);
dev = &per_cpu(omap3_idle_dev, smp_processor_id());
OpenPOWER on IntegriCloud