From patchwork Fri Apr 12 12:36:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 16111 Return-Path: X-Original-To: linaro@staging.patches.linaro.org Delivered-To: linaro@staging.patches.linaro.org Received: from mail-vb0-f69.google.com (mail-vb0-f69.google.com [209.85.212.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C0C8626EB0 for ; Fri, 12 Apr 2013 12:37:31 +0000 (UTC) Received: by mail-vb0-f69.google.com with SMTP id p12sf4193114vbe.0 for ; Fri, 12 Apr 2013 05:37: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=GTCwJJebhTEjLx4qKuAt8pc+FtkQyyJG7T4ATX9hatI=; b=nu548vcLjpakzh4FcHF7x06cdiUWiCFGu/WLn3+vJbrSWu141TVbKjGmkeddLAj/O6 fRhflimBtW1e9W+KH4LaQjnST6t1XPFpuUzxgXPQvkyEoav1mr69iGwrPYlNoUHdBo/l XpsjN7bKcxhgMEYhgKh1+XZNPDLW8PumzXlpu3pBsGzzt9deRtEzxb+Ut8b0VzdoUjc+ 6QauzkuKAHjGklgioSecXsuD5hq+k6oHVcELIHOKMVXTvjVKywQJRlnFC88PN+40vwhA lRX0ix+nmeU0vn0hq8KJon8QBEvH15mghdQUeLoqC2xH17ZN0WvuzG1xloU1Traoyyvb +47A== X-Received: by 10.236.147.79 with SMTP id s55mr5573153yhj.18.1365770228195; Fri, 12 Apr 2013 05:37:08 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.5.170 with SMTP id t10ls1028884qet.19.gmail; Fri, 12 Apr 2013 05:37:08 -0700 (PDT) X-Received: by 10.58.215.46 with SMTP id of14mr6497969vec.56.1365770228071; Fri, 12 Apr 2013 05:37:08 -0700 (PDT) Received: from mail-vb0-x235.google.com (mail-vb0-x235.google.com [2607:f8b0:400c:c02::235]) by mx.google.com with ESMTPS id b4si6381748vdw.5.2013.04.12.05.37.08 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Apr 2013 05:37:08 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::235 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::235; Received: by mail-vb0-f53.google.com with SMTP id i3so2096997vbh.12 for ; Fri, 12 Apr 2013 05:37:08 -0700 (PDT) X-Received: by 10.58.48.166 with SMTP id m6mr8061499ven.59.1365770227926; Fri, 12 Apr 2013 05:37:07 -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 nf2csp64106veb; Fri, 12 Apr 2013 05:37:07 -0700 (PDT) X-Received: by 10.180.109.197 with SMTP id hu5mr3779033wib.22.1365770226910; Fri, 12 Apr 2013 05:37:06 -0700 (PDT) Received: from mail-we0-x234.google.com (mail-we0-x234.google.com [2a00:1450:400c:c03::234]) by mx.google.com with ESMTPS id bm6si3029342wjc.39.2013.04.12.05.37.06 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Apr 2013 05:37:06 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c03::234 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=2a00:1450:400c:c03::234; Received: by mail-we0-f180.google.com with SMTP id r5so1962778wey.25 for ; Fri, 12 Apr 2013 05:37:06 -0700 (PDT) X-Received: by 10.194.171.74 with SMTP id as10mr17250443wjc.0.1365770226497; Fri, 12 Apr 2013 05:37:06 -0700 (PDT) Received: from mai.home (AToulouse-654-1-349-85.w90-55.abo.wanadoo.fr. [90.55.188.85]) by mx.google.com with ESMTPS id ej8sm3043646wib.9.2013.04.12.05.37.03 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Apr 2013 05:37:05 -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: [V3 patch 18/19] ARM: davinci: cpuidle: use init/exit common routine Date: Fri, 12 Apr 2013 14:36:04 +0200 Message-Id: <1365770165-27096-19-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1365770165-27096-1-git-send-email-daniel.lezcano@linaro.org> References: <1365770165-27096-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQkZyCndp9JjPB92fzQzF/bkpbUyw7tJPT7uGwsyrqjFtb2UK+lSUZg2d1IxPGUbYesLXA53 X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::235 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: Sekhar Nori --- arch/arm/mach-davinci/cpuidle.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/arch/arm/mach-davinci/cpuidle.c b/arch/arm/mach-davinci/cpuidle.c index c2887c5..36aef3a 100644 --- a/arch/arm/mach-davinci/cpuidle.c +++ b/arch/arm/mach-davinci/cpuidle.c @@ -25,7 +25,6 @@ #define DAVINCI_CPUIDLE_MAX_STATES 2 -static DEFINE_PER_CPU(struct cpuidle_device, davinci_cpuidle_device); static void __iomem *ddr2_reg_base; static bool ddr2_pdown; @@ -76,12 +75,8 @@ static struct cpuidle_driver davinci_idle_driver = { static int __init davinci_cpuidle_probe(struct platform_device *pdev) { - int ret; - struct cpuidle_device *device; struct davinci_cpuidle_config *pdata = pdev->dev.platform_data; - device = &per_cpu(davinci_cpuidle_device, smp_processor_id()); - if (!pdata) { dev_err(&pdev->dev, "cannot get platform data\n"); return -ENOENT; @@ -91,20 +86,7 @@ static int __init davinci_cpuidle_probe(struct platform_device *pdev) ddr2_pdown = pdata->ddr2_pdown; - ret = cpuidle_register_driver(&davinci_idle_driver); - if (ret) { - dev_err(&pdev->dev, "failed to register driver\n"); - return ret; - } - - ret = cpuidle_register_device(device); - if (ret) { - dev_err(&pdev->dev, "failed to register device\n"); - cpuidle_unregister_driver(&davinci_idle_driver); - return ret; - } - - return 0; + return cpuidle_register(&davinci_idle_driver, NULL); } static struct platform_driver davinci_cpuidle_driver = {