From patchwork Mon Mar 25 17:55:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 15620 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 A7FFE23E2C for ; Mon, 25 Mar 2013 17:56:11 +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 601F4A194BB for ; Mon, 25 Mar 2013 17:56:11 +0000 (UTC) Received: by mail-ve0-f169.google.com with SMTP id d10so1664643vea.28 for ; Mon, 25 Mar 2013 10:56:10 -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=0L/h3g8PZGczzXdCocTpR8h9BKHLLBAkdthzAyupzR4=; b=eYgnSk2XISrrAh+HpO5xK3BR0IINSA9axlbprQJKfeDFj6tuuCs7cvnzKMV8y0Klbs m8C05gFP8Nb/JDilBSb+6qFKDsT6drHdBCDj6t2wKTq7DOqvRxkLDmEoG7hsR9/NG7uG 9PqwnWnqMGOK0V9eKRomtUI8AC2hogbtystyQcyk+bvMgLxBo42mu0xGYV09b70ZU75+ flKoNlTKG1uynEqiNAVkgZaHs7taMS6Lu/lUDxx5FhMJGBBC3A56Q7eysCXwQQsqQSW8 Bp5ezZYE0O/+Nky04Yae+o9o0Qh0Ai7lQLnJY1pZKpPnXugWbyhXwFIm16IMXpoCOXi4 KA5A== X-Received: by 10.220.154.199 with SMTP id p7mr16923309vcw.46.1364234170910; Mon, 25 Mar 2013 10:56:10 -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 cg12csp37246ved; Mon, 25 Mar 2013 10:56:10 -0700 (PDT) X-Received: by 10.180.92.229 with SMTP id cp5mr4136105wib.20.1364234170037; Mon, 25 Mar 2013 10:56:10 -0700 (PDT) Received: from mail-wi0-x234.google.com ([2a00:1450:400c:c05::234]) by mx.google.com with ESMTPS id de2si5396373wjc.17.2013.03.25.10.56.09 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Mar 2013 10:56:10 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c05::234 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=2a00:1450:400c:c05::234; Authentication-Results: mx.google.com; spf=neutral (google.com: 2a00:1450:400c:c05::234 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-wi0-f180.google.com with SMTP id c10so2396108wiw.13 for ; Mon, 25 Mar 2013 10:56:09 -0700 (PDT) X-Received: by 10.181.12.5 with SMTP id em5mr19034437wid.24.1364234169627; Mon, 25 Mar 2013 10:56:09 -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.07 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Mar 2013 10:56:09 -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 11/15] ARM: s3c64xx: cpuidle: use init/exit common routine Date: Mon, 25 Mar 2013 18:55:36 +0100 Message-Id: <1364234140-514-12-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: ALoCoQlZdI1oJU0NYwYi5ql9mrIGaLi3mOmawIF+fuCA5dV5SG7jCTIT/for/eWzPEiubtMuytQk Remove the duplicate code and use the arm cpuidle driver's common code for initialization. Signed-off-by: Daniel Lezcano --- arch/arm/mach-s3c64xx/cpuidle.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/arch/arm/mach-s3c64xx/cpuidle.c b/arch/arm/mach-s3c64xx/cpuidle.c index ead5fab..ce56142 100644 --- a/arch/arm/mach-s3c64xx/cpuidle.c +++ b/arch/arm/mach-s3c64xx/cpuidle.c @@ -16,6 +16,7 @@ #include #include +#include #include #include @@ -40,8 +41,6 @@ static int s3c64xx_enter_idle(struct cpuidle_device *dev, return index; } -static DEFINE_PER_CPU(struct cpuidle_device, s3c64xx_cpuidle_device); - static struct cpuidle_driver s3c64xx_cpuidle_driver = { .name = "s3c64xx_cpuidle", .owner = THIS_MODULE, @@ -61,16 +60,6 @@ static struct cpuidle_driver s3c64xx_cpuidle_driver = { static int __init s3c64xx_init_cpuidle(void) { - int ret; - - cpuidle_register_driver(&s3c64xx_cpuidle_driver); - - ret = cpuidle_register_device(&s3c64xx_cpuidle_device); - if (ret) { - pr_err("Failed to register cpuidle device: %d\n", ret); - return ret; - } - - return 0; + return arm_cpuidle_init(&s3c64xx_cpuidle_driver); } device_initcall(s3c64xx_init_cpuidle);