From patchwork Tue Apr 23 08:54:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 16338 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gh0-f197.google.com (mail-gh0-f197.google.com [209.85.160.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C70FA2391B for ; Tue, 23 Apr 2013 08:55:56 +0000 (UTC) Received: by mail-gh0-f197.google.com with SMTP id r17sf698845ghr.4 for ; Tue, 23 Apr 2013 01:55:08 -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=poTsTwLqJwtuqVIcsgr8j+RcNLQBqXp5SYMBffmoP5M=; b=oycgMMV9bfoYHYtMbwCImluAXkwJ/VLEtEl9kIOlz2BOlbS0Ml6LFXY3LZZTPkglzU maLc2e3mpzfO/VhGJ4g4obL1GHu01zMLVbWFjSAZ5UgF8V0xZVVtdzp09k0yM7BZL7Um laL3eyfYWwNZiDNjJyOhMXiAL30LqKGwyp74DbGhopcNJUbuVq7ITd08cFj9WH+rcSmG J20jBTzBUIs7XqbBya7AXZyBUJlvynCTGnffu28xDJ6jn/g4J742pUMTj+3vTwX33W7n jHeQ/A76VK0gqpsrZDd5+/yTy6XPVPpY48oZBi5oSX1SWxvly6G+8cbZH5/NH+psh+RB UkCA== X-Received: by 10.236.226.3 with SMTP id a3mr13955358yhq.12.1366707308509; Tue, 23 Apr 2013 01:55:08 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.97.229 with SMTP id ed5ls201923qeb.32.gmail; Tue, 23 Apr 2013 01:55:08 -0700 (PDT) X-Received: by 10.220.153.69 with SMTP id j5mr21484676vcw.35.1366707308401; Tue, 23 Apr 2013 01:55:08 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id ex4si18015770vdb.92.2013.04.23.01.55.08 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 23 Apr 2013 01:55:08 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.169 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.169; Received: by mail-vc0-f169.google.com with SMTP id gd11so362145vcb.28 for ; Tue, 23 Apr 2013 01:55:08 -0700 (PDT) X-Received: by 10.52.228.71 with SMTP id sg7mr17890346vdc.51.1366707308203; Tue, 23 Apr 2013 01:55:08 -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 nf2csp113999veb; Tue, 23 Apr 2013 01:55:07 -0700 (PDT) X-Received: by 10.194.176.195 with SMTP id ck3mr38049478wjc.5.1366707307181; Tue, 23 Apr 2013 01:55:07 -0700 (PDT) Received: from mail-wg0-x234.google.com (mail-wg0-x234.google.com [2a00:1450:400c:c00::234]) by mx.google.com with ESMTPS id ep9si5936355wic.18.2013.04.23.01.55.06 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 23 Apr 2013 01:55:07 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c00::234 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=2a00:1450:400c:c00::234; Received: by mail-wg0-f52.google.com with SMTP id k13so158663wgh.7 for ; Tue, 23 Apr 2013 01:55:06 -0700 (PDT) X-Received: by 10.180.13.166 with SMTP id i6mr73336981wic.21.1366707306768; Tue, 23 Apr 2013 01:55:06 -0700 (PDT) Received: from mai.home (AToulouse-654-1-479-219.w86-201.abo.wanadoo.fr. [86.201.194.219]) by mx.google.com with ESMTPS id q13sm27358775wie.8.2013.04.23.01.55.04 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 23 Apr 2013 01:55:06 -0700 (PDT) From: Daniel Lezcano To: rjw@sisk.pl Cc: andrew@lunn.ch, khilman@deeprootsystems.com, nsekhar@ti.com, josephl@nvidia.com, kgene.kim@samsung.com, patches@linaro.org, magnus.damm@gmail.com, tony@atomide.com, plagnioj@jcrosoft.com, linaro-kernel@lists.linaro.org, jason@lakedaemon.net, swarren@wwwdotorg.org, rob.herring@calxeda.com, horms@verge.net.au, linux@maxim.org.za, linux-arm-kernel@lists.infradead.org, deepthi@linux.vnet.ibm.com, jkosina@suse.cz, linux-pm@vger.kernel.org, lethal@linux-sh.org, kernel@pengutronix.de Subject: [V4 patch 07/15] ARM: tegra: cpuidle: use init/exit common routine Date: Tue, 23 Apr 2013 10:54:37 +0200 Message-Id: <1366707285-12179-8-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1366707285-12179-1-git-send-email-daniel.lezcano@linaro.org> References: <1366707285-12179-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQmmxY2p/Uo9hbrfBQaToMZiapnWvQ33oHXBG8QHvP0nb3Knoe645LmzXRy4Xf3QyBPdRbbS X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.169 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); }