From patchwork Thu Apr 11 20:42:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 16063 Return-Path: X-Original-To: linaro@staging.patches.linaro.org Delivered-To: linaro@staging.patches.linaro.org Received: from mail-gg0-f198.google.com (mail-gg0-f198.google.com [209.85.161.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AA906238FF for ; Thu, 11 Apr 2013 20:43:56 +0000 (UTC) Received: by mail-gg0-f198.google.com with SMTP id a5sf2661302ggn.5 for ; Thu, 11 Apr 2013 13:43:34 -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=mjNWsuXBCm7ypV9NrNHS73bYDpbn3a1SJP8m7QCSSC9IBLLV6w9qLiFLpB7wJ/vGlP 3hEPRJ8QIszmzgdzuEYLQ3GpxPQ/tB0qX/09FfrX913l/jlXDN6HypRHut4K9jq4JOSK VjVOus8+nTASylkQ9PfhPFpPd/EYQ4mzYB/xmjgq570HOuZjvpE9jscj4lRFGpyxf/D3 eQEIi1dd1ooxffQgA1xEmxjRkFk9hHxJR68qJeqYMOoRb85sorR8N1+gO6LH9ClBANYe /uh6EfgJPVHYC7lTkqjpgPP92+UCXT5m68Pn0Hj6YJM6bH+HY3mSrdkV0wJM3c+gVAib mb5g== X-Received: by 10.236.114.39 with SMTP id b27mr4096648yhh.50.1365713014648; Thu, 11 Apr 2013 13:43:34 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.99.74 with SMTP id eo10ls1117444qeb.29.gmail; Thu, 11 Apr 2013 13:43:34 -0700 (PDT) X-Received: by 10.58.220.229 with SMTP id pz5mr6349635vec.30.1365713014359; Thu, 11 Apr 2013 13:43:34 -0700 (PDT) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id kn11si4356513veb.34.2013.04.11.13.43.34 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Apr 2013 13:43:34 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.172; Received: by mail-ve0-f172.google.com with SMTP id oz10so1872569veb.3 for ; Thu, 11 Apr 2013 13:43:34 -0700 (PDT) X-Received: by 10.58.48.166 with SMTP id m6mr6180274ven.59.1365713014191; Thu, 11 Apr 2013 13:43:34 -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 nf2csp38042veb; Thu, 11 Apr 2013 13:43:33 -0700 (PDT) X-Received: by 10.180.185.239 with SMTP id ff15mr40944wic.2.1365713013301; Thu, 11 Apr 2013 13:43:33 -0700 (PDT) Received: from mail-we0-x233.google.com (mail-we0-x233.google.com [2a00:1450:400c:c03::233]) by mx.google.com with ESMTPS id bu18si1396192wib.108.2013.04.11.13.43.32 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Apr 2013 13:43:33 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c03::233 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=2a00:1450:400c:c03::233; Received: by mail-we0-f179.google.com with SMTP id p43so1530820wea.38 for ; Thu, 11 Apr 2013 13:43:32 -0700 (PDT) X-Received: by 10.180.188.3 with SMTP id fw3mr12760418wic.33.1365713012839; Thu, 11 Apr 2013 13:43:32 -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.30 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Apr 2013 13:43:32 -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 15/19] ARM: tegra: cpuidle: use init/exit common routine for tegra3 Date: Thu, 11 Apr 2013 22:42:45 +0200 Message-Id: <1365712969-7541-16-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: ALoCoQk6MV+jlBJ7qdCrbgV4OaT7OA2PMbVGdJo0LyNb8LCMJ4ytjJ1b5gga8vll7FdtstxjQFa8 X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.172 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); }