From patchwork Tue Apr 24 14:05:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 8075 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 3C1ED23E1D for ; Tue, 24 Apr 2012 14:05:55 +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 EBB4BA18935 for ; Tue, 24 Apr 2012 14:05:54 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so1457668iag.11 for ; Tue, 24 Apr 2012 07:05:54 -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=xcNjw9XY0xDV83s8h4LcSACTXjDrgqgflVSBTymRzZ8=; b=HkrziFCDtauXL4QfzE1c+zHhZ+cFxGe2feaL7ScOowQn0hZNq90X8EDlejYAq0tHWG 1ZAOHrON9N4GOpEXyp7qs21mTJLb2PyggM0v5R/0WCinZeV9tV68JY8A/LEKsP46jy87 GiMih4sHac/XWSa4Eq+F5mI1+hc9X6+SqnuXDGC9Ox6IRIrF8Dxg+NPkQuNwNMTSiCVN meVNu1CKHxKFVreL7RdPeG6ngcT9FBvy+ZODNHPW8eHauxtXdUpmkPLNnENIaXy7NffB TcIEGz1D2rSHi2LlPwVzUZ5nFZmbJPeeS4G5PY7h2dggzP+gyLohqYjLGufPTskIcGiD VuhQ== Received: by 10.50.194.163 with SMTP id hx3mr10123418igc.49.1335276354731; Tue, 24 Apr 2012 07:05:54 -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 x6csp183963ibt; Tue, 24 Apr 2012 07:05:53 -0700 (PDT) Received: by 10.180.97.41 with SMTP id dx9mr12997447wib.9.1335276353343; Tue, 24 Apr 2012 07:05:53 -0700 (PDT) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by mx.google.com with ESMTPS id o46si19378689wee.12.2012.04.24.07.05.52 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Apr 2012 07:05:53 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.178 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=209.85.212.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.178 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) smtp.mail=daniel.lezcano@linaro.org Received: by wibhq7 with SMTP id hq7so570843wib.13 for ; Tue, 24 Apr 2012 07:05:52 -0700 (PDT) Received: by 10.180.94.33 with SMTP id cz1mr31855253wib.13.1335276352660; Tue, 24 Apr 2012 07:05:52 -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.05.51 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Apr 2012 07:05:52 -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 06/18][V3] ARM: OMAP4: cpuidle - use the omap4_idle_data variable directly Date: Tue, 24 Apr 2012 16:05:27 +0200 Message-Id: <1335276339-11135-7-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: ALoCoQnqlPec86DW8kTnBuC3TN9nwmcVDQBcrrZrKP7CRyPQwAi2LBb8d6SgVlsP8O/HZ9U5s8gc We are storing the 'omap4_idle_data' in the private data field of the cpuidle device. As we are using this variable only in this file, that does not really make sense. Let's use the global variable directly. Signed-off-by: Daniel Lezcano Reviewed-by: Jean Pihet Reviewed-by: Santosh Shilimkar --- arch/arm/mach-omap2/cpuidle44xx.c | 13 +++---------- 1 files changed, 3 insertions(+), 10 deletions(-) diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c index 9e3effa..f1410f1 100644 --- a/arch/arm/mach-omap2/cpuidle44xx.c +++ b/arch/arm/mach-omap2/cpuidle44xx.c @@ -24,7 +24,7 @@ #ifdef CONFIG_CPU_IDLE -/* Machine specific information to be recorded in the C-state driver_data */ +/* Machine specific information */ struct omap4_idle_statedata { u32 cpu_state; u32 mpu_logic_state; @@ -65,8 +65,7 @@ static int omap4_enter_idle(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) { - struct omap4_idle_statedata *cx = - cpuidle_get_statedata(&dev->states_usage[index]); + struct omap4_idle_statedata *cx = &omap4_idle_data[index]; u32 cpu1_state; int cpu_id = smp_processor_id(); @@ -83,7 +82,7 @@ static int omap4_enter_idle(struct cpuidle_device *dev, cpu1_state = pwrdm_read_pwrst(cpu1_pd); if (cpu1_state != PWRDM_POWER_OFF) { index = drv->safe_state_index; - cx = cpuidle_get_statedata(&dev->states_usage[index]); + cx = &omap4_idle_data[index]; } if (index > 0) @@ -176,15 +175,9 @@ static inline struct omap4_idle_statedata *_fill_cstate_usage( int idx) { struct omap4_idle_statedata *cx = &omap4_idle_data[idx]; - struct cpuidle_state_usage *state_usage = &dev->states_usage[idx]; - - cpuidle_set_statedata(state_usage, cx); - return cx; } - - /** * omap4_idle_init - Init routine for OMAP4 idle *