From patchwork Mon Mar 25 17:55:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 15624 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id AEE9A23E2C for ; Mon, 25 Mar 2013 17:56:22 +0000 (UTC) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by fiordland.canonical.com (Postfix) with ESMTP id 69367A194B3 for ; Mon, 25 Mar 2013 17:56:22 +0000 (UTC) Received: by mail-ve0-f169.google.com with SMTP id d10so1664766vea.28 for ; Mon, 25 Mar 2013 10:56:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=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; bh=gnmVWZtPETPflVi+qsEJjRZX2g/CgpVFoSWD0zb+ujI=; b=WPAi/lmh1Fxa3L1Qk5mbPhveZRynKiG1OmMyM9LQ/L+FIt4CJtJzTDLG8JdY9IAHqo skmOmOSxX+EWxLtdzodrrM9EpOwNu3aqWQsjIIrdYRPZwTTWqkEdYu2N8RXiFsNFe8IW a4kkJ2Hyr6O0JPAA+5Lbs0hK3RvWyp7Ajk9t5l4n14OEbKOn0CKBWyhOnIy4QVwjyGSE 0Gpl8n54hhp9fTWSzJxHaFd7vbKd5Br4YOH3FgxFd3TRb7AHHwBzgnwtj/AIXpHm/xBW 7urw/h/pct7mg6YY2lLjxECLV0RX9edvcTzvK//LyULT3/zsHNVzB8DT+PW4BnuAXSXV yXYQ== X-Received: by 10.58.29.101 with SMTP id j5mr16859788veh.26.1364234181917; Mon, 25 Mar 2013 10:56:21 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.59.4.204 with SMTP id cg12csp37254ved; Mon, 25 Mar 2013 10:56:21 -0700 (PDT) X-Received: by 10.180.97.233 with SMTP id ed9mr27226641wib.32.1364234181057; Mon, 25 Mar 2013 10:56:21 -0700 (PDT) Received: from mail-we0-x22d.google.com ([2a00:1450:400c:c03::22d]) by mx.google.com with ESMTPS id f3si5368305wjy.206.2013.03.25.10.56.20 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Mar 2013 10:56:20 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c03::22d is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=2a00:1450:400c:c03::22d; Authentication-Results: mx.google.com; spf=neutral (google.com: 2a00:1450:400c:c03::22d is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) smtp.mail=daniel.lezcano@linaro.org Received: by mail-we0-f173.google.com with SMTP id t57so1179339wey.18 for ; Mon, 25 Mar 2013 10:56:20 -0700 (PDT) X-Received: by 10.194.83.33 with SMTP id n1mr19896854wjy.7.1364234180191; Mon, 25 Mar 2013 10:56:20 -0700 (PDT) Received: from mai.home (AToulouse-654-1-426-131.w2-6.abo.wanadoo.fr. [2.6.209.131]) by mx.google.com with ESMTPS id s2sm23927749wib.4.2013.03.25.10.56.17 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Mar 2013 10:56:19 -0700 (PDT) From: Daniel Lezcano To: rjw@sisk.pl, tglx@linutronix.de Cc: patches@linaro.org, linaro-kernel@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, linux@maxim.org.za, nicolas.ferre@atmel.com, plagnioj@jcrosoft.com, lenb@kernel.org, nsekhar@ti.com, kevin.hilman@linaro.org, horms@verge.net.au, magnus.damm@gmail.com, kernel@pengutronix.de, ben-linux@fluff.org, kgene.kim@samsung.com, rob.herring@calxeda.com, jason@lakedaemon.net, andrew@lunn.ch, linus.walleij@linaro.org, linux@arm.linux.org.uk Subject: [PATCH 15/15] ARM: shmobile: cpuidle: use init/exit common routine Date: Mon, 25 Mar 2013 18:55:40 +0100 Message-Id: <1364234140-514-16-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1364234140-514-1-git-send-email-daniel.lezcano@linaro.org> References: <1364234140-514-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQmTmEWuwO8kf1bq2dhW2EpJw+GyKhTh3Obw1YdhYILCqk1wJi2oSh855PlMZ3tkzVMJ5R5k Remove the duplicate code and use the arm cpuidle driver's 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 c872ae8..9744d88 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, @@ -35,12 +34,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 arm_cpuidle_init(cpuidle_drv); }