From patchwork Thu Apr 11 20:42:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 16060 Return-Path: X-Original-To: linaro@staging.patches.linaro.org Delivered-To: linaro@staging.patches.linaro.org Received: from mail-ve0-f199.google.com (mail-ve0-f199.google.com [209.85.128.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 59E6F238FF for ; Thu, 11 Apr 2013 20:43:49 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id jw11sf3372445veb.10 for ; Thu, 11 Apr 2013 13:43:27 -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=BVrnIOb4VRfZo+SzYnNGN6jY9eskdezl8Ck1jt5QNRW7Y9YRbvDDetZUNBTC/t+BYg rCANw8zimNCx+dr9Mdet8EnZekuHtOjnQvuP/Bmk9Zql8+634HLakKZMysBdvipY0uaY RnQIjHxS51EGkVxLsNmd5vgoi6KSuDX5oIa7N+7AfPdDWPwWX1L/keMgIkRC37qRLDEH 2BGMVvoPdXLP5Vr4TATi87+iuEBbZEBiDX8ECahR73005Qp7av5HMPLEJw3cIheUFqwU tNIROAEptbox8JzmnRedVWup+TwQ6vLkSQYJI05awI9DlG0QmN+aEyeeADlw+MXqBDuP Miow== X-Received: by 10.224.18.132 with SMTP id w4mr4665526qaa.1.1365713007217; Thu, 11 Apr 2013 13:43:27 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.42.38 with SMTP id k6ls1062310qel.4.gmail; Thu, 11 Apr 2013 13:43:27 -0700 (PDT) X-Received: by 10.220.124.74 with SMTP id t10mr6246547vcr.67.1365713007091; Thu, 11 Apr 2013 13:43:27 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id sa4si4404464vdc.23.2013.04.11.13.43.27 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Apr 2013 13:43:27 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.179 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.179; Received: by mail-vc0-f179.google.com with SMTP id hz11so1690104vcb.10 for ; Thu, 11 Apr 2013 13:43:27 -0700 (PDT) X-Received: by 10.52.71.4 with SMTP id q4mr5398234vdu.8.1365713006932; Thu, 11 Apr 2013 13:43:26 -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 nf2csp38033veb; Thu, 11 Apr 2013 13:43:26 -0700 (PDT) X-Received: by 10.194.176.228 with SMTP id cl4mr13385668wjc.10.1365713005835; Thu, 11 Apr 2013 13:43:25 -0700 (PDT) Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com [74.125.82.53]) by mx.google.com with ESMTPS id ff16si1410275wic.38.2013.04.11.13.43.25 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Apr 2013 13:43:25 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.53 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=74.125.82.53; Received: by mail-wg0-f53.google.com with SMTP id c11so2046830wgh.8 for ; Thu, 11 Apr 2013 13:43:25 -0700 (PDT) X-Received: by 10.180.13.233 with SMTP id k9mr24425wic.6.1365713005449; Thu, 11 Apr 2013 13:43:25 -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.22 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Apr 2013 13:43:24 -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 12/19] ARM: shmobile: cpuidle: use init/exit common routine Date: Thu, 11 Apr 2013 22:42:42 +0200 Message-Id: <1365712969-7541-13-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: ALoCoQn6YreeoweJc8cGL2B2Pdj7v+uDTWtkALVHWrH7N9hYbnOg90EilMX76EEsmGW0e5fMwI/C X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.179 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); }