From patchwork Thu Jul 18 12:54:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 2829639 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BD1069F9CF for ; Thu, 18 Jul 2013 12:57:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9BAB520165 for ; Thu, 18 Jul 2013 12:57:08 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3F5712014A for ; Thu, 18 Jul 2013 12:57:07 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UznkB-0007tf-3y; Thu, 18 Jul 2013 12:55:39 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uznjt-0001Zx-V0; Thu, 18 Jul 2013 12:55:21 +0000 Received: from mail-we0-f182.google.com ([74.125.82.182]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UznjX-0001VO-37 for linux-arm-kernel@lists.infradead.org; Thu, 18 Jul 2013 12:55:00 +0000 Received: by mail-we0-f182.google.com with SMTP id p60so2821169wes.41 for ; Thu, 18 Jul 2013 05:54:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=IhpIZhTh+uCgGKqG8Bk7HwCCbxX8x6hIGCLe4ajBmzw=; b=W+FZWK46bLuvGgZlQ0mXzosr+RGmo9E7N93QtkY7NrzutCX+xbdBWvxME6w9dN4xbZ yp9zl4+hk4Ez2LeNhnz5aV/Y4FBlosKO3JL3Gk6Qx9io9DFUrTH2DlLhdozsXr7ul+Gu DB9Cd2epD6tmEpbacKTIJV+XWibF6d6Kn8UpkaCQFZKj9zU59EjLh+o4vAB7CE4YIjBD JPn84YrzL38CjiwtznE3dgF1bu2FxkeI4hFGzMTbNQ5OeuAD5Qq2R86IT9H7L3zIJI86 zBIAvFI9iMDusYnw5gm9NPGHQNY8EDFfsV79HPrKwqc6PS5YGVrbTkyH1FrXGWjaIgu0 ibfQ== X-Received: by 10.194.237.38 with SMTP id uz6mr8447320wjc.73.1374152077758; Thu, 18 Jul 2013 05:54:37 -0700 (PDT) Received: from mai.home (AToulouse-654-1-413-126.w82-125.abo.wanadoo.fr. [82.125.160.126]) by mx.google.com with ESMTPSA id r8sm16369267wiy.8.2013.07.18.05.54.35 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Jul 2013 05:54:37 -0700 (PDT) From: Daniel Lezcano To: kgene.kim@samsung.com, rjw@sisk.pl Subject: [PATCH 3/4] ARM: exynos: cpuidle: Move exynos4_idle_driver declaration below in the code Date: Thu, 18 Jul 2013 14:54:29 +0200 Message-Id: <1374152070-21008-3-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1374152070-21008-1-git-send-email-daniel.lezcano@linaro.org> References: <1374152070-21008-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQktDM9I+5pmBEDGubP71HQrf7nROpbzhFODmY0LZN2f5FOEBNkd4I3VjMHx9+2KncBoihqv X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130718_085459_290403_56FCFB2D X-CRM114-Status: GOOD ( 12.61 ) X-Spam-Score: -2.6 (--) Cc: patches@linaro.org, linaro-kernel@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In order to prevent a pointless forward declaration, move the driver declation after the idle function callback, right before the init function. Signed-off-by: Daniel Lezcano Reviewed-by: Tomasz Figa --- arch/arm/mach-exynos/cpuidle.c | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c index d8fc1a2..8d06128 100644 --- a/arch/arm/mach-exynos/cpuidle.c +++ b/arch/arm/mach-exynos/cpuidle.c @@ -37,28 +37,6 @@ #define S5P_CHECK_AFTR 0xFCBA0D10 -static int exynos4_enter_lowpower(struct cpuidle_device *dev, - struct cpuidle_driver *drv, - int index); - -static struct cpuidle_driver exynos4_idle_driver = { - .name = "exynos4_idle", - .owner = THIS_MODULE, - .states = { - [0] = ARM_CPUIDLE_WFI_STATE, - [1] = { - .enter = exynos4_enter_lowpower, - .exit_latency = 300, - .target_residency = 100000, - .flags = CPUIDLE_FLAG_TIME_VALID, - .name = "C1", - .desc = "ARM power down", - }, - }, - .state_count = 2, - .safe_state_index = 0, -}; - /* Ext-GIC nIRQ/nFIQ is the only wakeup source in AFTR */ static void exynos4_set_wakeupmask(void) { @@ -184,6 +162,24 @@ static void __init exynos5_core_down_clk(void) __raw_writel(tmp, EXYNOS5_PWR_CTRL2); } +static struct cpuidle_driver exynos4_idle_driver = { + .name = "exynos4_idle", + .owner = THIS_MODULE, + .states = { + [0] = ARM_CPUIDLE_WFI_STATE, + [1] = { + .enter = exynos4_enter_lowpower, + .exit_latency = 300, + .target_residency = 100000, + .flags = CPUIDLE_FLAG_TIME_VALID, + .name = "C1", + .desc = "ARM power down", + }, + }, + .state_count = 2, + .safe_state_index = 0, +}; + static int __init exynos4_init_cpuidle(void) { if (soc_is_exynos5250())