From patchwork Fri Apr 12 12:35:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 16105 Return-Path: X-Original-To: linaro@staging.patches.linaro.org Delivered-To: linaro@staging.patches.linaro.org Received: from mail-ye0-f198.google.com (mail-ye0-f198.google.com [209.85.213.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4809226EB0 for ; Fri, 12 Apr 2013 12:37:15 +0000 (UTC) Received: by mail-ye0-f198.google.com with SMTP id m12sf3646575yen.9 for ; Fri, 12 Apr 2013 05:36:51 -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=7jLY4/BgIYY8I7/7RKXrtNJ1deGd23Gt5frnUhNpj+A=; b=lwt+GQRm5fg8nlI49B9nQy2cBGRP5exya6/bKI1YzdnTDzavJQBRG+WdSBRM9lrwYP 7i4IO78Xy1offzat05LGYFdswfeXUPOsRuGbjwBZRUiE1aYi288WwTSnrKGelu5T7xed goNKzj2+rJzsLCDocJ/Lst20+10GlXqITG8IagugSKy/VhJuSpfvthMtETCPXrZch1i/ p3rglsuEQVAw165/54SLFv06XDqHSSTudgItk25TTP7XiKvLdCuBwshJw/HAF5w/2Rqt 2PARXfzHpqRVqwkG5dSl83vupJs0E+KpFxGPQ8bUEQc+rxnVqr1yDfNpUq95IajV7J/r gbrA== X-Received: by 10.236.92.101 with SMTP id i65mr5291672yhf.10.1365770211719; Fri, 12 Apr 2013 05:36:51 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.26.37 with SMTP id i5ls1285595qeg.81.gmail; Fri, 12 Apr 2013 05:36:51 -0700 (PDT) X-Received: by 10.220.222.8 with SMTP id ie8mr8370238vcb.27.1365770211585; Fri, 12 Apr 2013 05:36:51 -0700 (PDT) Received: from mail-vb0-x22f.google.com (mail-vb0-x22f.google.com [2607:f8b0:400c:c02::22f]) by mx.google.com with ESMTPS id sc6si6374721vdc.21.2013.04.12.05.36.51 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Apr 2013 05:36:51 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::22f 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::22f; Received: by mail-vb0-f47.google.com with SMTP id x13so2093749vbb.34 for ; Fri, 12 Apr 2013 05:36:51 -0700 (PDT) X-Received: by 10.52.71.4 with SMTP id q4mr7023865vdu.8.1365770211430; Fri, 12 Apr 2013 05:36:51 -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 nf2csp64091veb; Fri, 12 Apr 2013 05:36:50 -0700 (PDT) X-Received: by 10.180.103.40 with SMTP id ft8mr3753035wib.28.1365770208736; Fri, 12 Apr 2013 05:36:48 -0700 (PDT) Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com [74.125.82.54]) by mx.google.com with ESMTPS id e7si3027215wjw.51.2013.04.12.05.36.48 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Apr 2013 05:36:48 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.54 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=74.125.82.54; Received: by mail-wg0-f54.google.com with SMTP id a12so2567649wgh.21 for ; Fri, 12 Apr 2013 05:36:48 -0700 (PDT) X-Received: by 10.194.109.35 with SMTP id hp3mr17303552wjb.15.1365770208214; Fri, 12 Apr 2013 05:36:48 -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.36.44 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Apr 2013 05:36:47 -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 12/19] ARM: shmobile: cpuidle: use init/exit common routine Date: Fri, 12 Apr 2013 14:35:58 +0200 Message-Id: <1365770165-27096-13-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: ALoCoQmX69WuViGnO/gJSsoiIjstIl5XeqoPvbOLnrYdcrzkmkFPrg8pn+Uaa8/2Cu6B2oufHJxv X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::22f 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: Simon Horman --- arch/arm/mach-shmobile/cpuidle.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/arch/arm/mach-shmobile/cpuidle.c b/arch/arm/mach-shmobile/cpuidle.c index d671ae9..0afeb5c 100644 --- a/arch/arm/mach-shmobile/cpuidle.c +++ b/arch/arm/mach-shmobile/cpuidle.c @@ -16,7 +16,6 @@ #include #include -static struct cpuidle_device shmobile_cpuidle_dev; static struct cpuidle_driver shmobile_cpuidle_default_driver = { .name = "shmobile_cpuidle", .owner = THIS_MODULE, @@ -34,12 +33,5 @@ void __init shmobile_cpuidle_set_driver(struct cpuidle_driver *drv) int __init shmobile_cpuidle_init(void) { - struct cpuidle_device *dev = &shmobile_cpuidle_dev; - - cpuidle_register_driver(cpuidle_drv); - - dev->state_count = cpuidle_drv->state_count; - cpuidle_register_device(dev); - - return 0; + return cpuidle_register(cpuidle_drv, NULL); }