From patchwork Fri Apr 12 12:36:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 16108 Return-Path: X-Original-To: linaro@staging.patches.linaro.org Delivered-To: linaro@staging.patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EF17F26EB0 for ; Fri, 12 Apr 2013 12:37:22 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id 26sf3763624yhr.10 for ; Fri, 12 Apr 2013 05:36:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received: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=y58kHajw97vzuWEpzhyEiOfYxG4CpOc2/P7Zwlkd5Xw=; b=bcnN69yfKv3IgR1AABELsQbP8IkAGgviM6+vZxc91YxGmRlmvgr+IBJplFrNyU4HMA +6kzYdBseTT2+buqn7kjGTFI6r1v3wgCD2wDKX19q2RsTHO6OZ6Kp1yC75Yg3MTKik5N fbctdoAty1mL1m3djUQKgIknDN9cNIHoXj85e9Epv8MTdQ5zCWrkRphXY2RBlUT5pDJU mCmV6XO+sL0r2hmIx+SiIDm0jPGAaP4jtdx9JwPzXLmZrPAr9ApW0ZdbemVD18r/FDPw nBpNLAk/dVUmQzB9n1kBejqY1jDg4i+CtyOKXCg/Qs7nule1JD8MESdREI7shhtnmHsE qefA== X-Received: by 10.236.148.211 with SMTP id v59mr5678879yhj.2.1365770219379; Fri, 12 Apr 2013 05:36:59 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.64.132 with SMTP id o4ls1363345qes.11.gmail; Fri, 12 Apr 2013 05:36:59 -0700 (PDT) X-Received: by 10.52.100.163 with SMTP id ez3mr6980336vdb.6.1365770218946; Fri, 12 Apr 2013 05:36:58 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id ex4si6334914vdb.118.2013.04.12.05.36.58 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Apr 2013 05:36:58 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.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.220.177; Received: by mail-vc0-f177.google.com with SMTP id hr11so2132933vcb.22 for ; Fri, 12 Apr 2013 05:36:58 -0700 (PDT) X-Received: by 10.221.0.199 with SMTP id nn7mr8367936vcb.14.1365770218796; Fri, 12 Apr 2013 05:36:58 -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.58.127.98 with SMTP id nf2csp64102veb; Fri, 12 Apr 2013 05:36:58 -0700 (PDT) X-Received: by 10.194.5.196 with SMTP id u4mr17229036wju.54.1365770217526; Fri, 12 Apr 2013 05:36:57 -0700 (PDT) Received: from mail-wg0-f46.google.com (mail-wg0-f46.google.com [74.125.82.46]) by mx.google.com with ESMTPS id dm6si3023105wjb.82.2013.04.12.05.36.57 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Apr 2013 05:36:57 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.46 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=74.125.82.46; Received: by mail-wg0-f46.google.com with SMTP id e11so461396wgh.1 for ; Fri, 12 Apr 2013 05:36:57 -0700 (PDT) X-Received: by 10.181.11.196 with SMTP id ek4mr3726638wid.30.1365770217099; Fri, 12 Apr 2013 05:36:57 -0700 (PDT) Received: from mai.home (AToulouse-654-1-349-85.w90-55.abo.wanadoo.fr. [90.55.188.85]) by mx.google.com with ESMTPS id ej8sm3043646wib.9.2013.04.12.05.36.54 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Apr 2013 05:36:56 -0700 (PDT) From: Daniel Lezcano To: rjw@sisk.pl Cc: linus.walleij@linaro.org, jason@lakedaemon.net, andrew@lunn.ch, kernel@pengutronix.de, swarren@wwwdotorg.org, santosh.shilimkar@ti.com, nicolas.ferre@atmel.com, plagnioj@jcrosoft.com, linux@maxim.org.za, rob.herring@calxeda.com, nsekhar@ti.com, horms@verge.net.au, magnus.damm@gmail.com, deepthi@linux.vnet.ibm.com, lethal@linux-sh.org, jkosina@suse.cz, kgene.kim@samsung.com, khilman@deeprootsystems.com, tony@atomide.com, linux-pm@vger.kernel.org, patches@linaro.org, linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org, josephl@nvidia.com Subject: [V3 patch 15/19] ARM: tegra: cpuidle: use init/exit common routine for tegra3 Date: Fri, 12 Apr 2013 14:36:01 +0200 Message-Id: <1365770165-27096-16-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1365770165-27096-1-git-send-email-daniel.lezcano@linaro.org> References: <1365770165-27096-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQn93Ymvxml3lWT+d/3EMSdvXJ5+bH8bPZ4nH4pmWfujc83HhD8+ZxrA5SVoLxpdjSbkSezA X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.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 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: , Remove the duplicated code and use the cpuidle common code for initialization. Signed-off-by: Daniel Lezcano Acked-by: Stephen Warren --- arch/arm/mach-tegra/cpuidle-tegra30.c | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/arch/arm/mach-tegra/cpuidle-tegra30.c b/arch/arm/mach-tegra/cpuidle-tegra30.c index f6a0c72..36dc2be 100644 --- a/arch/arm/mach-tegra/cpuidle-tegra30.c +++ b/arch/arm/mach-tegra/cpuidle-tegra30.c @@ -64,8 +64,6 @@ static struct cpuidle_driver tegra_idle_driver = { }, }; -static DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device); - #ifdef CONFIG_PM_SLEEP static bool tegra30_cpu_cluster_power_down(struct cpuidle_device *dev, struct cpuidle_driver *drv, @@ -156,31 +154,8 @@ static int tegra30_idle_lp2(struct cpuidle_device *dev, int __init tegra30_cpuidle_init(void) { - int ret; - unsigned int cpu; - struct cpuidle_device *dev; - struct cpuidle_driver *drv = &tegra_idle_driver; - #ifdef CONFIG_PM_SLEEP tegra_tear_down_cpu = tegra30_tear_down_cpu; #endif - - ret = cpuidle_register_driver(&tegra_idle_driver); - if (ret) { - pr_err("CPUidle driver registration failed\n"); - return ret; - } - - for_each_possible_cpu(cpu) { - dev = &per_cpu(tegra_idle_device, cpu); - dev->cpu = cpu; - - ret = cpuidle_register_device(dev); - if (ret) { - pr_err("CPU%u: CPUidle device registration failed\n", - cpu); - return ret; - } - } - return 0; + return cpuidle_register(&tegra_idle_driver, NULL); }