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: 18418 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f70.google.com (mail-vb0-f70.google.com [209.85.212.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 84A3320F44 for ; Thu, 18 Jul 2013 12:54:39 +0000 (UTC) Received: by mail-vb0-f70.google.com with SMTP id q12sf4074575vbe.5 for ; Thu, 18 Jul 2013 05:54:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=IhpIZhTh+uCgGKqG8Bk7HwCCbxX8x6hIGCLe4ajBmzw=; b=VtvaqRARDpLJyvkBp7ddLOqA8Rh/RIzF8M6r5jR/ocvVQwhrMJv0SqsSEFp3fy6FdP gnKDCFeo9Lo3qhDGUWJZ3wNuhvrQD507bn8zbx+ZqGOTIxCnxsYWZU6DN811nLsBGe39 FyspHy1PyHdc6qyVn//TnthGLYfGHa86xAnjvzxgtOt497/k3Td/d97dyTmPY4+O6FVf zH9uMQDTNXrkNiVwwp1eu88Zo9qDkpTD2QIh33tyc/gtsjm3pMw4v8GMDWp4UKkjwqbg wCkPEUxMKmUfQd64YCkh5JaMbab0S5lT1cYaXNjAAisaWzeLl6Cy1Y4zQ8ZMGJ7qTC/F Ta3Q== X-Received: by 10.236.63.37 with SMTP id z25mr6238921yhc.49.1374152079315; Thu, 18 Jul 2013 05:54:39 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.12.233 with SMTP id b9ls1275803qec.14.gmail; Thu, 18 Jul 2013 05:54:39 -0700 (PDT) X-Received: by 10.220.90.71 with SMTP id h7mr3971187vcm.16.1374152079180; Thu, 18 Jul 2013 05:54:39 -0700 (PDT) Received: from mail-ve0-f178.google.com (mail-ve0-f178.google.com [209.85.128.178]) by mx.google.com with ESMTPS id zx19si2748040veb.63.2013.07.18.05.54.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Jul 2013 05:54:39 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.178; Received: by mail-ve0-f178.google.com with SMTP id pb11so2464785veb.37 for ; Thu, 18 Jul 2013 05:54:39 -0700 (PDT) X-Received: by 10.52.91.202 with SMTP id cg10mr3324991vdb.85.1374152079081; Thu, 18 Jul 2013 05:54:39 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.149.77 with SMTP id s13csp223398vcv; Thu, 18 Jul 2013 05:54:38 -0700 (PDT) X-Received: by 10.194.242.69 with SMTP id wo5mr8453737wjc.30.1374152078205; Thu, 18 Jul 2013 05:54:38 -0700 (PDT) Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) by mx.google.com with ESMTPS id xm9si10791597wib.18.2013.07.18.05.54.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Jul 2013 05:54:38 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.179 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=209.85.212.179; Received: by mail-wi0-f179.google.com with SMTP id hj3so3143033wib.0 for ; Thu, 18 Jul 2013 05:54:37 -0700 (PDT) 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 Cc: linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, patches@linaro.org, linaro-kernel@lists.linaro.org 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: ALoCoQlNAafATPg6wvk2X0PkXfvGaieKhbKayqedGEamrajYnJADYrmefqB2MpazLsXTYhnpNDcg X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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())