From patchwork Thu Apr 11 20:42:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 16057 Return-Path: X-Original-To: linaro@staging.patches.linaro.org Delivered-To: linaro@staging.patches.linaro.org Received: from mail-ve0-f197.google.com (mail-ve0-f197.google.com [209.85.128.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F00BA238FF for ; Thu, 11 Apr 2013 20:43:41 +0000 (UTC) Received: by mail-ve0-f197.google.com with SMTP id jz10sf3372958veb.8 for ; Thu, 11 Apr 2013 13:43:19 -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=QucbzQzjBps8fHT40u7cqt/6WzO+lgDQkDUg2sztzng=; b=Xo+fr3AA2qh8OuUajs3WFwbTthZtj68RSxzz7F0MCoemgyW12HKmifKwmst2qsM/+P Y5beDru0v3qLmNSX3anCxWJQg4LiAH/34iDqdS0nbbM7FPB1YJ/obR12mYffO4jYlMmN hYYoVJD/aBoh/RgZ3Ljb6DkFnD6dTagZXtzyC0MR6qVvMXs6CJowKDmpV8CD4tD7TEll RmZR0q2N+bO7qzezI/qRwJ1JRXcA3wANawiPx/tOjC/TRMmQqSU1rV1p5u3eeVXVaUYW UHUuvToV/S58BwOXGvYSCpButnde+05I1yMfqMql62CNEHgGkGZyDJ13b93Hod7Dg8s9 8Lug== X-Received: by 10.224.172.200 with SMTP id m8mr4665847qaz.0.1365712999643; Thu, 11 Apr 2013 13:43:19 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.18.162 with SMTP id x2ls1072825qed.37.gmail; Thu, 11 Apr 2013 13:43:19 -0700 (PDT) X-Received: by 10.52.166.103 with SMTP id zf7mr5387863vdb.94.1365712999353; Thu, 11 Apr 2013 13:43:19 -0700 (PDT) Received: from mail-vb0-x22e.google.com (mail-vb0-x22e.google.com [2607:f8b0:400c:c02::22e]) by mx.google.com with ESMTPS id b3si4358622vea.33.2013.04.11.13.43.19 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Apr 2013 13:43:19 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::22e is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::22e; Received: by mail-vb0-f46.google.com with SMTP id 11so1592390vbe.5 for ; Thu, 11 Apr 2013 13:43:19 -0700 (PDT) X-Received: by 10.58.84.164 with SMTP id a4mr6424852vez.9.1365712999193; Thu, 11 Apr 2013 13:43:19 -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 nf2csp38027veb; Thu, 11 Apr 2013 13:43:18 -0700 (PDT) X-Received: by 10.194.5.196 with SMTP id u4mr13287759wju.54.1365712998010; Thu, 11 Apr 2013 13:43:18 -0700 (PDT) Received: from mail-wg0-f49.google.com (mail-wg0-f49.google.com [74.125.82.49]) by mx.google.com with ESMTPS id q6si1396942wix.104.2013.04.11.13.43.17 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Apr 2013 13:43:18 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.49 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=74.125.82.49; Received: by mail-wg0-f49.google.com with SMTP id x12so923126wgg.16 for ; Thu, 11 Apr 2013 13:43:17 -0700 (PDT) X-Received: by 10.194.89.234 with SMTP id br10mr13333775wjb.43.1365712997610; Thu, 11 Apr 2013 13:43:17 -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.15 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Apr 2013 13:43:16 -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 09/19] ARM: OMAP3: cpuidle: use init/exit common routine Date: Thu, 11 Apr 2013 22:42:39 +0200 Message-Id: <1365712969-7541-10-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: ALoCoQlsb+iQJN8njkYHo2SuXf0vYy9uRqh8BadlrEmAvXA/1hLr/yS7TIJV6fM+deeULfLyVszH X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::22e 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 --- arch/arm/mach-omap2/cpuidle34xx.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index 027a787..cca045c 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "powerdomain.h" #include "clockdomain.h" @@ -259,8 +260,6 @@ static int omap3_enter_idle_bm(struct cpuidle_device *dev, return ret; } -static DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev); - static struct cpuidle_driver omap3_idle_driver = { .name = "omap3_idle", .owner = THIS_MODULE, @@ -336,8 +335,6 @@ static struct cpuidle_driver omap3_idle_driver = { */ int __init omap3_idle_init(void) { - struct cpuidle_device *dev; - mpu_pd = pwrdm_lookup("mpu_pwrdm"); core_pd = pwrdm_lookup("core_pwrdm"); per_pd = pwrdm_lookup("per_pwrdm"); @@ -346,16 +343,5 @@ int __init omap3_idle_init(void) if (!mpu_pd || !core_pd || !per_pd || !cam_pd) return -ENODEV; - cpuidle_register_driver(&omap3_idle_driver); - - dev = &per_cpu(omap3_idle_dev, smp_processor_id()); - dev->cpu = 0; - - if (cpuidle_register_device(dev)) { - printk(KERN_ERR "%s: CPUidle register device failed\n", - __func__); - return -EIO; - } - - return 0; + return cpuidle_register(&omap3_idle_driver, NULL); }