From patchwork Thu Apr 11 20:42:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 16059 Return-Path: X-Original-To: linaro@staging.patches.linaro.org Delivered-To: linaro@staging.patches.linaro.org Received: from mail-qe0-f69.google.com (mail-qe0-f69.google.com [209.85.128.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 46942238FF for ; Thu, 11 Apr 2013 20:43:46 +0000 (UTC) Received: by mail-qe0-f69.google.com with SMTP id 2sf3381363qea.4 for ; Thu, 11 Apr 2013 13:43:24 -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=XIKnf/8IIlLbR9wTfkIqk98cuSW4cj8XFLQDAyYQOHyH7aW8MIEbmYLM6B44qvrfAC SSv/p49M0DRSbNGNaVKtt/z8RVkFl5Zq9y0HNdFuLptOzg36Zh3IXCeN0sHggJpIHi3A rzTEMPfoA5bvm3Aa3hfdA2D600U2yCk6iBNR+xWm2SlPhSZ516ZJa4UE6dRY3a1TxFIR jNtVdlB31xrP/IeAOoiVWo/qVh6sCyb93EWMUWfX8jxBoo0Zrivn/F/KrlBgxd+6LfKF aqQsOOmKorGzwwLyaK6Jf2U9RU6+iPWN9f24eSiM6joJf/n7AHmRDGTd58dlPb3FQZ2r 3ifQ== X-Received: by 10.224.58.77 with SMTP id f13mr4658397qah.7.1365713004093; Thu, 11 Apr 2013 13:43:24 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.40.226 with SMTP id a2ls1070851qel.43.gmail; Thu, 11 Apr 2013 13:43:23 -0700 (PDT) X-Received: by 10.58.75.46 with SMTP id z14mr6231725vev.52.1365713003883; Thu, 11 Apr 2013 13:43:23 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id d10si4375995vdv.93.2013.04.11.13.43.23 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Apr 2013 13:43:23 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.174 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.174; Received: by mail-vc0-f174.google.com with SMTP id kw10so1642879vcb.5 for ; Thu, 11 Apr 2013 13:43:23 -0700 (PDT) X-Received: by 10.221.0.199 with SMTP id nn7mr6427609vcb.14.1365713003734; Thu, 11 Apr 2013 13:43:23 -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 nf2csp38030veb; Thu, 11 Apr 2013 13:43:23 -0700 (PDT) X-Received: by 10.180.76.84 with SMTP id i20mr11062wiw.9.1365713002810; Thu, 11 Apr 2013 13:43:22 -0700 (PDT) Received: from mail-wg0-f51.google.com (mail-wg0-f51.google.com [74.125.82.51]) by mx.google.com with ESMTPS id ca19si1413470wib.10.2013.04.11.13.43.22 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Apr 2013 13:43:22 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.51 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=74.125.82.51; Received: by mail-wg0-f51.google.com with SMTP id b12so2103909wgh.30 for ; Thu, 11 Apr 2013 13:43:22 -0700 (PDT) X-Received: by 10.194.121.129 with SMTP id lk1mr4840456wjb.45.1365713002423; Thu, 11 Apr 2013 13:43:22 -0700 (PDT) Received: from mai.home (AToulouse-654-1-501-244.w83-205.abo.wanadoo.fr. [83.205.84.244]) by mx.google.com with ESMTPS id fv2sm5794029wib.6.2013.04.11.13.43.20 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Apr 2013 13:43:21 -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: [V2 patch 11/19] ARM: tegra: cpuidle: use init/exit common routine Date: Thu, 11 Apr 2013 22:42:41 +0200 Message-Id: <1365712969-7541-12-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1365712969-7541-1-git-send-email-daniel.lezcano@linaro.org> References: <1365712969-7541-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQnhZt2a+kAEXa9s9TYiINy4c+uQnlIEA7Oobz8K8lWjl8JlyK2dPVDMXzH4qLAs3h5zJ+J6 X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.174 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); }