From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Lezcano Subject: [PATCH 18/18][V3] ARM: OMAP3: cpuidle - set global variables static Date: Tue, 24 Apr 2012 16:05:39 +0200 Message-ID: <1335276339-11135-19-git-send-email-daniel.lezcano@linaro.org> References: <1335276339-11135-1-git-send-email-daniel.lezcano@linaro.org> Return-path: Received: from mail-wi0-f178.google.com ([209.85.212.178]:48974 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753650Ab2DXOGP (ORCPT ); Tue, 24 Apr 2012 10:06:15 -0400 Received: by mail-wi0-f178.google.com with SMTP id hq7so719542wib.1 for ; Tue, 24 Apr 2012 07:06:15 -0700 (PDT) In-Reply-To: <1335276339-11135-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: santosh.shilimkar@ti.com, jean.pihet@newoldbits.com, khilman@ti.com, tony@atomide.com Cc: linux-omap@vger.kernel.org, linaro-dev@lists.linaro.org, linux-arm-kernel@lists.infradead.org, patches@linaro.org and check the powerdomain lookup is successful. Signed-off-by: Daniel Lezcano Reviewed-by: Jean Pihet --- arch/arm/mach-omap2/cpuidle34xx.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index 0d28596..116a0d8 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c @@ -73,7 +73,7 @@ static struct omap3_idle_statedata omap3_idle_data[] = { }, }; -struct powerdomain *mpu_pd, *core_pd, *per_pd, *cam_pd; +static struct powerdomain *mpu_pd, *core_pd, *per_pd, *cam_pd; static int _cpuidle_allow_idle(struct powerdomain *pwrdm, struct clockdomain *clkdm) @@ -252,6 +252,9 @@ static int omap3_enter_idle_bm(struct cpuidle_device *dev, * its own code. */ + if (!mpu_pd || !core_pd || !per_pd || !cam_pd) + return -ENODEV; + /* * Prevent PER off if CORE is not in retention or off as this * would disable PER wakeups completely. -- 1.7.5.4