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: 2431111 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 9427ADFE76 for ; Thu, 11 Apr 2013 20:43:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422650Ab3DKUnd (ORCPT ); Thu, 11 Apr 2013 16:43:33 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:42051 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422633Ab3DKUn0 (ORCPT ); Thu, 11 Apr 2013 16:43:26 -0400 Received: by mail-wi0-f182.google.com with SMTP id hi18so990362wib.9 for ; Thu, 11 Apr 2013 13:43:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=7jLY4/BgIYY8I7/7RKXrtNJ1deGd23Gt5frnUhNpj+A=; b=WWAKPqFQZVJPXzfWvVLtoHll6LTMEX2ByHbXvAJ9LoFyQO+p/kvWMZN2rXrWJrESvG YMp2q1TLzuI7kuq5h5vBOQGdfDgSa6gdIn6kY7x4EBeOgbdkfj0lXJ/YZ5GXVr/I+fO2 mC/vv3Sx+FJ/BlRQzscpaFWLgj5xs7luw7BwVnTkOs3h1I8/G+7kniF3g7XEWMOOP5qc YcRF1lWZwzI1qn1eGc66fd2vJ5PRQmPuixEtb2jeYaMkSD404AMsiPI2P+3iW9TsVQBS Kw9iqaPVGmspt5/UP3FU6UD8hu6A3eo2LgKazfMYMVOGxRJMH5Xd+41/JAK80X5T8f/O DyTg== 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: ALoCoQm0NGznBdND4IorNYHaTVoIEA+SeItkYjyBjpsg7T5mGTVqYT8wojMGmL3ElecpVlk+8a0p Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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); }