From patchwork Tue Apr 8 12:19:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 27937 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f198.google.com (mail-ig0-f198.google.com [209.85.213.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0109B2066E for ; Tue, 8 Apr 2014 12:19:28 +0000 (UTC) Received: by mail-ig0-f198.google.com with SMTP id ur14sf2697757igb.5 for ; Tue, 08 Apr 2014 05:19:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=LYgWdTAN/OQx1MMMbuIt4ttCoaZ1mLX6o49S5JmgkRI=; b=exdAbhHw1eze1CeU7D6BOcpcz8Srpr2o8ypsTypFciS4UX8ZVOPF5gA0+Ukw0UYzof lfp4lbQms8xlgxQ7NIZyw6fcyL5wnvkSNwF2ujvsGfbjg/I8PZM30EHg6oSRHKcza5ub DuVLvbgmPcYO1B2PaeesdjSXE21QGr+3d/QQ1Jn83sPXDymJ74aUmsTXvd6iWrFuti8A 4xf3//KAVE04UDS6Eb7X4DqyNNURWfXhNBLgeqJJ2el3w9iWQ2D2EYnf+HUaxzs7l/ti FvegIYYWBicNUdIpHMknJTceDcyZtWsxSAz1IDwivDB2Q9bGMTGEk6NdCYZsfE1WKS01 vQTA== X-Gm-Message-State: ALoCoQkXeDGWNOsiUBVB4+mhWKg5HkCqFDiMzIWlz8AFxKmia5qFj5sm0CONqGZpN+OZbS845p4A X-Received: by 10.182.128.232 with SMTP id nr8mr1633417obb.31.1396959568120; Tue, 08 Apr 2014 05:19:28 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.94.141 with SMTP id g13ls174485qge.76.gmail; Tue, 08 Apr 2014 05:19:28 -0700 (PDT) X-Received: by 10.58.77.238 with SMTP id v14mr309697vew.27.1396959567978; Tue, 08 Apr 2014 05:19:27 -0700 (PDT) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by mx.google.com with ESMTPS id u5si361038vdo.22.2014.04.08.05.19.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 08 Apr 2014 05:19:27 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.177 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.177; Received: by mail-ve0-f177.google.com with SMTP id sa20so653296veb.8 for ; Tue, 08 Apr 2014 05:19:27 -0700 (PDT) X-Received: by 10.58.123.71 with SMTP id ly7mr3026266veb.11.1396959567871; Tue, 08 Apr 2014 05:19:27 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.12.8 with SMTP id v8csp240605vcv; Tue, 8 Apr 2014 05:19:27 -0700 (PDT) X-Received: by 10.67.14.69 with SMTP id fe5mr4244277pad.120.1396959566788; Tue, 08 Apr 2014 05:19:26 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id my2si987767pbc.154.2014.04.08.05.19.26; Tue, 08 Apr 2014 05:19:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756520AbaDHMTZ (ORCPT + 9 others); Tue, 8 Apr 2014 08:19:25 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:64217 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756433AbaDHMTY (ORCPT ); Tue, 8 Apr 2014 08:19:24 -0400 Received: by mail-wi0-f173.google.com with SMTP id z2so6896962wiv.12 for ; Tue, 08 Apr 2014 05:19:23 -0700 (PDT) X-Received: by 10.194.78.4 with SMTP id x4mr3565651wjw.58.1396959563526; Tue, 08 Apr 2014 05:19:23 -0700 (PDT) Received: from localhost.localdomain (AToulouse-654-1-451-172.w83-205.abo.wanadoo.fr. [83.205.74.172]) by mx.google.com with ESMTPSA id u1sm3000063wjx.16.2014.04.08.05.19.21 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 08 Apr 2014 05:19:22 -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, b.zolnierkie@samsung.com, sachin.kamat@linaro.org, viresh.kumar@linaro.org, rjw@rjwysocki.net Subject: [PATCH V3 01/17] ARM: exynos: cpuidle: Prevent forward declaration Date: Tue, 8 Apr 2014 14:19:23 +0200 Message-Id: <1396959579-18268-2-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1396959579-18268-1-git-send-email-daniel.lezcano@linaro.org> References: <1396959579-18268-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.177 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 Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 --- 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 b530231..9623a05 100644 --- a/arch/arm/mach-exynos/cpuidle.c +++ b/arch/arm/mach-exynos/cpuidle.c @@ -59,30 +59,8 @@ #define PWR_CTRL2_CORE2_UP_RATIO (1 << 4) #define PWR_CTRL2_CORE1_UP_RATIO (1 << 0) -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) { @@ -213,6 +191,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 exynos_cpuidle_probe(struct platform_device *pdev) { int cpu_id, ret;