From patchwork Tue Apr 24 14:05:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 8087 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 09D2023E1D for ; Tue, 24 Apr 2012 14:06:17 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id C72BFA1828B for ; Tue, 24 Apr 2012 14:06:16 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so1457668iag.11 for ; Tue, 24 Apr 2012 07:06:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=c4B5Q1ZDaoaOEc5YiacDbZ8mnxSEagSr6sdPKn7sgsU=; b=PIHh7uLMHOT/i45ipwsO0cEpgkzVnPgwCvm9joM9TXWenlKvrFEBpkJjfS3gnbPu8/ UpDUSeeZE2iMvr+eeMnsbBt1XFtBHoyTEqB2xa/mCSasNszyZGNbet4rgSNl1toRream Q9wL6AhHNjBYd5s8ron8nRKY2nR5tg6ORcq4ifN6ecRDVG2j8FwxamOD+TYcN+X+DZTE X6la/3gGt031Wn7WJahCIePNeyT+TXTw8AdTz0IdJPp0Eeu3hGKxYnEBBnKsPnjYX1ZM Ax+yAf9ipSrAanPXkBQajT0G7C0DjzgScJ0/SR1xDQ8YgQs9SiCrPMEvPRIXHcb1/JKG 0vyA== Received: by 10.42.19.72 with SMTP id a8mr68023icb.39.1335276376591; Tue, 24 Apr 2012 07:06:16 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.137.198 with SMTP id x6csp184023ibt; Tue, 24 Apr 2012 07:06:16 -0700 (PDT) Received: by 10.180.80.9 with SMTP id n9mr8966843wix.4.1335276375482; Tue, 24 Apr 2012 07:06:15 -0700 (PDT) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx.google.com with ESMTPS id bt8si13302092wib.40.2012.04.24.07.06.15 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Apr 2012 07:06:15 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=74.125.82.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) smtp.mail=daniel.lezcano@linaro.org Received: by mail-wg0-f50.google.com with SMTP id ds12so684920wgb.31 for ; Tue, 24 Apr 2012 07:06:15 -0700 (PDT) Received: by 10.180.76.240 with SMTP id n16mr28859737wiw.10.1335276375028; Tue, 24 Apr 2012 07:06:15 -0700 (PDT) Received: from localhost.localdomain (AToulouse-159-1-17-225.w92-134.abo.wanadoo.fr. [92.134.64.225]) by mx.google.com with ESMTPS id fl2sm47121222wib.2.2012.04.24.07.06.13 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Apr 2012 07:06:14 -0700 (PDT) From: Daniel Lezcano 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 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> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1335276339-11135-1-git-send-email-daniel.lezcano@linaro.org> References: <1335276339-11135-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQlGwP67vJZFvyRuIFhR9by46pYnFkRTJFB0Ke0k+iQrf1zslI96l2zhKluy0kdaiV4SC9/H 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.