From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: khilman@ti.com
Cc: santosh.shilimkar@ti.com, jean.pihet@newoldbits.com,
tony@atomide.com, linux-omap@vger.kernel.org,
linaro-dev@lists.linaro.org,
linux-arm-kernel@lists.infradead.org, patches@linaro.org
Subject: [PATCH 1/2] ARM: OMAP3: cpuidle - check the powerdomain lookup
Date: Fri, 4 May 2012 19:18:40 +0200 [thread overview]
Message-ID: <1336151921-9485-2-git-send-email-daniel.lezcano@linaro.org> (raw)
In-Reply-To: <1336151921-9485-1-git-send-email-daniel.lezcano@linaro.org>
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>
---
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
next prev parent reply other threads:[~2012-05-04 17:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-04 17:18 [PATCH 0/2] ARM: OMAP3/4: cpuidle - misc fixes Daniel Lezcano
2012-05-04 17:18 ` Daniel Lezcano [this message]
2012-05-04 21:23 ` [PATCH 1/2] ARM: OMAP3: cpuidle - check the powerdomain lookup Kevin Hilman
2012-05-04 17:18 ` [PATCH 2/2] ARM: OMAP3/4: consolidate cpuidle Makefile Daniel Lezcano
2012-05-08 20:25 ` Daniel Lezcano
2012-05-08 20:45 ` Kevin Hilman
2012-05-08 20:44 ` Kevin Hilman
2012-05-08 21:02 ` Daniel Lezcano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1336151921-9485-2-git-send-email-daniel.lezcano@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=jean.pihet@newoldbits.com \
--cc=khilman@ti.com \
--cc=linaro-dev@lists.linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=patches@linaro.org \
--cc=santosh.shilimkar@ti.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox