Re: [PATCH 1/2] ARM: OMAP3: cpuidle - check the powerdomain lookup

2012-05-04 Thread Kevin Hilman
Daniel Lezcano  writes:

> 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 
> Reviewed-by: Jean Pihet 

Thanks, applying to my for_3.5/cleanup/omap-cpuidle branch.

Kevin

> ---
>  arch/arm/mach-omap2/cpuidle34xx.c |3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/cpuidle34xx.c 
> b/arch/arm/mach-omap2/cpuidle34xx.c
> index f682e17..207bc1c 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());
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/2] ARM: OMAP3: cpuidle - check the powerdomain lookup

2012-05-04 Thread Daniel Lezcano
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 
Reviewed-by: Jean Pihet 
---
 arch/arm/mach-omap2/cpuidle34xx.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/cpuidle34xx.c 
b/arch/arm/mach-omap2/cpuidle34xx.c
index f682e17..207bc1c 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());
-- 
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html