From patchwork Fri Apr 11 10:39:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 3967721 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 30D0DBFF02 for ; Fri, 11 Apr 2014 10:41:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 647C9207F3 for ; Fri, 11 Apr 2014 10:41:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 67ED7207EF for ; Fri, 11 Apr 2014 10:41:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757149AbaDKKl0 (ORCPT ); Fri, 11 Apr 2014 06:41:26 -0400 Received: from mail-wg0-f46.google.com ([74.125.82.46]:55063 "EHLO mail-wg0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932575AbaDKKkA (ORCPT ); Fri, 11 Apr 2014 06:40:00 -0400 Received: by mail-wg0-f46.google.com with SMTP id b13so5246112wgh.5 for ; Fri, 11 Apr 2014 03:39:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=XPtDhTrvyZoxtaiJBvVAmA/jU4LGJBzzDspOkHb2dQ4=; b=gInNBX0hx3qdrhYAAJ1IJFhFp2wMJIEx/NZ+vP+MY44RSLpaJPRsGLyney4Z1rgg6V fYiVxL2NFUhiX0Wr1TK1D3Z0K6qGb/6HW+0VWxOSfL0td2Tg3kq7cPYGqUPqQvMwSMe4 csJIvxdKHI+CEBckSbboKxZE2OSCdFhlvJsTTS2VttrPNUz2YdJ6L7a33Ef6XJ8Yn4bL tf+z0xHg5W40fxlxvmKKBIpqpVkmEcMoTwrZE5gY2kl0zjvAIV7jfjjA+W/WS7B1gYVP Rekz3UK2bw00PWtFoN1H/cq4ezLglHG88qOY5ByEkBMVrY6RL9jcu+fDyyW4uMrCEGEu 2OCg== X-Gm-Message-State: ALoCoQnQpPF2QThYae4gFpIN1HvYdYtzEXGKG893/UTZHyHIO1DSNge+MtEunJBUMXY1mlb8jIuq X-Received: by 10.194.20.229 with SMTP id q5mr813059wje.86.1397212798921; Fri, 11 Apr 2014 03:39:58 -0700 (PDT) Received: from localhost.localdomain (AToulouse-654-1-377-242.w86-199.abo.wanadoo.fr. [86.199.232.242]) by mx.google.com with ESMTPSA id eq8sm3683033wib.16.2014.04.11.03.39.57 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Apr 2014 03:39:58 -0700 (PDT) From: Daniel Lezcano To: kgene.kim@samsung.com Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, t.figa@samsung.com, linaro-kernel@lists.linaro.org, rjw@rjwysocki.net Subject: [PATCH V5 02/20] ARM: exynos: cpuidle: Prevent forward declaration Date: Fri, 11 Apr 2014 12:39:57 +0200 Message-Id: <1397212815-16068-3-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1397212815-16068-1-git-send-email-daniel.lezcano@linaro.org> References: <1397212815-16068-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Move the structure below the 'exynos4_enter_lowpower' function so no more need of forward declaration. Signed-off-by: Daniel Lezcano Reviewed-by: Viresh Kumar Reviewed-by: Bartlomiej Zolnierkiewicz 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 3e260ba..17df0d8 100644 --- a/arch/arm/mach-exynos/cpuidle.c +++ b/arch/arm/mach-exynos/cpuidle.c @@ -40,30 +40,8 @@ #define S5P_CHECK_AFTR 0xFCBA0D10 -static int exynos4_enter_lowpower(struct cpuidle_device *dev, - struct cpuidle_driver *drv, - int index); - static DEFINE_PER_CPU(struct cpuidle_device, exynos4_cpuidle_device); -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) { @@ -162,6 +140,24 @@ static int exynos4_enter_lowpower(struct cpuidle_device *dev, return exynos4_enter_core0_aftr(dev, drv, new_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, +}; + static int exynos_cpuidle_probe(struct platform_device *pdev) { int cpu_id, ret;