From patchwork Wed Apr 10 14:22:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 16026 Return-Path: X-Original-To: linaro@staging.patches.linaro.org Delivered-To: linaro@staging.patches.linaro.org Received: from mail-gg0-f199.google.com (mail-gg0-f199.google.com [209.85.161.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0F70B23912 for ; Wed, 10 Apr 2013 14:23:23 +0000 (UTC) Received: by mail-gg0-f199.google.com with SMTP id v2sf676078ggc.6 for ; Wed, 10 Apr 2013 07:23:03 -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=Qt0OM8vTAhW3iDWujfvTvdPq3rlhD43Eg7oDd2qVh+M=; b=ejCpi4tgEgVzUQimJgfDBnZ2fbDR0vqN8GubgGafgLxdFODRBufr60c/AJ7egminEK qViKH5s/yVBd2i9L8sWMr9hpUFgFioZazsCA6nrdJbIRi4Fp5k0JVkEZ0/r0T9uel4kt yECbvR+3QDuIBWWESg/vjaMWTo8KKhOAubDHLDHiNcjM48+bedBFih4ItpPAY+7bA95q kiVskXsUEV4Q2Xl5UHK3Vj8kHBLbRVNdPZcBTOk5kC1pLBf3u8xEpzGHA4/NjzocDClO /UGkXo8hcfbHPFtwvwJUfVXT48miDWXe51Ss3d+85Cno78CHxVFNLViWx5MbsfisF0kw h0Ew== X-Received: by 10.236.149.147 with SMTP id x19mr1090606yhj.31.1365603783899; Wed, 10 Apr 2013 07:23:03 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.87.103 with SMTP id w7ls270839qez.83.gmail; Wed, 10 Apr 2013 07:23:03 -0700 (PDT) X-Received: by 10.220.168.2 with SMTP id s2mr1689117vcy.6.1365603783427; Wed, 10 Apr 2013 07:23:03 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id u19si100016vcp.48.2013.04.10.07.23.03 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 10 Apr 2013 07:23:03 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.182 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.182; Received: by mail-vc0-f182.google.com with SMTP id ht10so415932vcb.13 for ; Wed, 10 Apr 2013 07:23:03 -0700 (PDT) X-Received: by 10.220.153.143 with SMTP id k15mr1700047vcw.13.1365603783154; Wed, 10 Apr 2013 07:23:03 -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.85.136 with SMTP id h8csp107481vez; Wed, 10 Apr 2013 07:23:02 -0700 (PDT) X-Received: by 10.180.24.65 with SMTP id s1mr3922596wif.0.1365603782238; Wed, 10 Apr 2013 07:23:02 -0700 (PDT) Received: from mail-we0-x229.google.com (mail-we0-x229.google.com [2a00:1450:400c:c03::229]) by mx.google.com with ESMTPS id j5si8101251wie.36.2013.04.10.07.23.01 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 10 Apr 2013 07:23:02 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c03::229 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=2a00:1450:400c:c03::229; Received: by mail-we0-f169.google.com with SMTP id x43so433914wey.28 for ; Wed, 10 Apr 2013 07:23:01 -0700 (PDT) X-Received: by 10.180.103.65 with SMTP id fu1mr3882529wib.4.1365603779349; Wed, 10 Apr 2013 07:22:59 -0700 (PDT) Received: from mai.home (AToulouse-654-1-413-119.w82-125.abo.wanadoo.fr. [82.125.160.119]) by mx.google.com with ESMTPS id dp5sm32126938wib.1.2013.04.10.07.22.56 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 10 Apr 2013 07:22:58 -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: [PATCH 10/18] ARM: tegra1: cpuidle: use init/exit common routine Date: Wed, 10 Apr 2013 16:22:15 +0200 Message-Id: <1365603743-5618-11-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1365603743-5618-1-git-send-email-daniel.lezcano@linaro.org> References: <1365603743-5618-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQlRavAF1UYJG368q/ppo1DpeJgg5Le+ZCbnykx55Rx6sQrVwP0fpcysCSEFebhqZWM32W4C X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.182 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-tegra114.c | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/arch/arm/mach-tegra/cpuidle-tegra114.c b/arch/arm/mach-tegra/cpuidle-tegra114.c index c5fadf9..1d1c602 100644 --- a/arch/arm/mach-tegra/cpuidle-tegra114.c +++ b/arch/arm/mach-tegra/cpuidle-tegra114.c @@ -29,31 +29,7 @@ static struct cpuidle_driver tegra_idle_driver = { }, }; -static DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device); - int __init tegra114_cpuidle_init(void) { - int ret; - unsigned int cpu; - struct cpuidle_device *dev; - struct cpuidle_driver *drv = &tegra_idle_driver; - - 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); }