Skip to content

Commit

Permalink
ARM: OMAP3: cpuidle - check the powerdomain lookup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel Lezcano authored and Kevin Hilman committed May 4, 2012
1 parent 34fd57b commit daa37ce
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/arm/mach-omap2/cpuidle34xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit daa37ce

Please sign in to comment.