From patchwork Tue Apr 23 08:54:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 16339 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f200.google.com (mail-vc0-f200.google.com [209.85.220.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0B0372391B for ; Tue, 23 Apr 2013 08:56:00 +0000 (UTC) Received: by mail-vc0-f200.google.com with SMTP id hz11sf719126vcb.7 for ; Tue, 23 Apr 2013 01:55:11 -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=ayhRXSsCb4UQKIMkxKeqkXbm8DDdpOAc5RkM3O0y5p/+viJUSk1XYRys0evSyCZJ1Z hl8GQv45SPa1RGDLnUkjQqA/VWjRvdYg5/85PxEWT7BRJjfof9eA2rlmLLfhDuzc5N1W ZPqYaPgGi+R/VAJZfRiYQnpvRRonf5HJOuqu/JdUZPZXZ8RLwakGiU9aRXpJ+L631nsm SS3ID9m+asjzKR4ioVwBUelEROwJVGMyeJt/ZvkUc34wHFRhvNlHP9bxTW3GlEurNNI2 wlboyA4YBwxkBBJaEHdhInIgQNlV4Y6id/fPGIppTLoI8uwc9x/f4NUrEA8MVYg1t4Cc W91g== X-Received: by 10.236.82.46 with SMTP id n34mr14739091yhe.24.1366707311648; Tue, 23 Apr 2013 01:55:11 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.40.198 with SMTP id z6ls196978qek.71.gmail; Tue, 23 Apr 2013 01:55:11 -0700 (PDT) X-Received: by 10.52.180.195 with SMTP id dq3mr19223876vdc.9.1366707311496; Tue, 23 Apr 2013 01:55:11 -0700 (PDT) Received: from mail-vb0-x229.google.com (mail-vb0-x229.google.com [2607:f8b0:400c:c02::229]) by mx.google.com with ESMTPS id p20si18008305veh.21.2013.04.23.01.55.11 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 23 Apr 2013 01:55:11 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::229 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::229; Received: by mail-vb0-f41.google.com with SMTP id f13so344098vbg.28 for ; Tue, 23 Apr 2013 01:55:11 -0700 (PDT) X-Received: by 10.52.71.4 with SMTP id q4mr18333081vdu.8.1366707311023; Tue, 23 Apr 2013 01:55:11 -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 nf2csp114000veb; Tue, 23 Apr 2013 01:55:10 -0700 (PDT) X-Received: by 10.194.93.231 with SMTP id cx7mr52628343wjb.33.1366707309826; Tue, 23 Apr 2013 01:55:09 -0700 (PDT) Received: from mail-wi0-x230.google.com (mail-wi0-x230.google.com [2a00:1450:400c:c05::230]) by mx.google.com with ESMTPS id c12si5936339wiw.19.2013.04.23.01.55.09 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 23 Apr 2013 01:55:09 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c05::230 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=2a00:1450:400c:c05::230; Received: by mail-wi0-f176.google.com with SMTP id hj19so5741592wib.3 for ; Tue, 23 Apr 2013 01:55:09 -0700 (PDT) X-Received: by 10.180.188.3 with SMTP id fw3mr27846559wic.33.1366707309374; Tue, 23 Apr 2013 01:55:09 -0700 (PDT) Received: from mai.home (AToulouse-654-1-479-219.w86-201.abo.wanadoo.fr. [86.201.194.219]) by mx.google.com with ESMTPS id q13sm27358775wie.8.2013.04.23.01.55.06 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 23 Apr 2013 01:55:08 -0700 (PDT) From: Daniel Lezcano To: rjw@sisk.pl Cc: andrew@lunn.ch, khilman@deeprootsystems.com, nsekhar@ti.com, josephl@nvidia.com, kgene.kim@samsung.com, patches@linaro.org, magnus.damm@gmail.com, tony@atomide.com, plagnioj@jcrosoft.com, linaro-kernel@lists.linaro.org, jason@lakedaemon.net, swarren@wwwdotorg.org, rob.herring@calxeda.com, horms@verge.net.au, linux@maxim.org.za, linux-arm-kernel@lists.infradead.org, deepthi@linux.vnet.ibm.com, jkosina@suse.cz, linux-pm@vger.kernel.org, lethal@linux-sh.org, kernel@pengutronix.de Subject: [V4 patch 08/15] ARM: shmobile: cpuidle: use init/exit common routine Date: Tue, 23 Apr 2013 10:54:38 +0200 Message-Id: <1366707285-12179-9-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1366707285-12179-1-git-send-email-daniel.lezcano@linaro.org> References: <1366707285-12179-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQkJss78ZEGnWcWK0uW0yV97V+/CRyYpghu0b3snrFpVJVdeDR6TlVEJR8nAJT7BHCe9SuPB X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::229 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); }