From patchwork Fri Mar 15 14:27:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 2278301 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 3C33EDF24C for ; Fri, 15 Mar 2013 14:33:16 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UGVeD-0008CG-1c; Fri, 15 Mar 2013 14:30:17 +0000 Received: from mail-wi0-x229.google.com ([2a00:1450:400c:c05::229]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UGVbW-0006zo-CU for linux-arm-kernel@lists.infradead.org; Fri, 15 Mar 2013 14:27:31 +0000 Received: by mail-wi0-f169.google.com with SMTP id l13so670630wie.0 for ; Fri, 15 Mar 2013 07:27:28 -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=GAFddHvpkfa8UdDrLShTepb9SJJKAyKIbYG7m0fU0ZE=; b=lAQzFfnHngtwdeozjkrekVHUQ6mOGfCYqkMBCTv5GI3dZ5mq0aofIXFOyB+vYE8SkE hsH1+Int4/Bs+yr9f+Bmm3v/Xq4IgemU8ZZCHrXw8OAaLhPLmcKUyi8dsM1l17dmKdMb osxHjWKdgbclVWju9oBeHhGBX+tanNCPvw/X5GHDN+gEUPtxl6zVBcHksua+9qKjhKaK 9tcRaFi5hN1wc6BdI4vkJ3ljXHUPEZmW3/q8lyPcjGdl8UJrwHnM5SYYB4LIWcChXZ7I NGt92j0znAtFGTbASOQGlHLoQZBFf1ZfJwk3cwR2aJf+lBQVZz5MgRdBWM2hOXssSthi 0cMw== X-Received: by 10.180.84.165 with SMTP id a5mr3407186wiz.6.1363357648479; Fri, 15 Mar 2013 07:27:28 -0700 (PDT) Received: from mai.home (AToulouse-654-1-276-229.w90-5.abo.wanadoo.fr. [90.5.59.229]) by mx.google.com with ESMTPS id fv2sm3486696wib.6.2013.03.15.07.27.26 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Mar 2013 07:27:27 -0700 (PDT) From: Daniel Lezcano To: linaro-kernel@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Subject: [RFC patch 06/11] cpuidle / at91 : use common ARM cpuidle driver Date: Fri, 15 Mar 2013 15:27:05 +0100 Message-Id: <1363357630-22214-7-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1363357630-22214-1-git-send-email-daniel.lezcano@linaro.org> References: <1363357630-22214-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQkjJAy+SvLbeVHxQhHRAhsW6ljuLUNK7mv+NSMjQA4a8oYo9+/qtCuUeqzHEgL4fkyNGn0b X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130315_102730_577992_713BD4A1 X-CRM114-Status: GOOD ( 11.50 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: andrew@lunn.ch, magnus.damm@gmail.com, ben-linux@fluff.org, nsekhar@ti.com, nicolas.ferre@atmel.com, rob.herring@calxeda.com, rjw@sisk.pl, kevin.hilman@linaro.org, horms@verge.net.au, kernel@pengutronix.de, kgene.kim@samsung.com, plagnioj@jcrosoft.com, linux@maxim.org.za, jason@lakedaemon.net, lenb@kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Signed-off-by: Daniel Lezcano --- arch/arm/mach-at91/cpuidle.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/arch/arm/mach-at91/cpuidle.c b/arch/arm/mach-at91/cpuidle.c index 0c63815..9dc4f6f 100644 --- a/arch/arm/mach-at91/cpuidle.c +++ b/arch/arm/mach-at91/cpuidle.c @@ -27,8 +27,6 @@ #define AT91_MAX_STATES 2 -static DEFINE_PER_CPU(struct cpuidle_device, at91_cpuidle_device); - /* Actual code that puts the SoC in different idle states */ static int at91_enter_idle(struct cpuidle_device *dev, struct cpuidle_driver *drv, @@ -63,18 +61,7 @@ static struct cpuidle_driver at91_idle_driver = { /* Initialize CPU idle by registering the idle states */ static int at91_init_cpuidle(void) { - struct cpuidle_device *device; - - device = &per_cpu(at91_cpuidle_device, smp_processor_id()); - device->state_count = AT91_MAX_STATES; - - cpuidle_register_driver(&at91_idle_driver); - - if (cpuidle_register_device(device)) { - printk(KERN_ERR "at91_init_cpuidle: Failed registering\n"); - return -EIO; - } - return 0; + return arm_idle_init(&at91_idle_driver); } device_initcall(at91_init_cpuidle);