From patchwork Fri Mar 15 14:27:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 2278351 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 166D3DF24C for ; Fri, 15 Mar 2013 14:36:47 +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 1UGVhr-0002Dt-5l; Fri, 15 Mar 2013 14:34:03 +0000 Received: from mail-wg0-x229.google.com ([2a00:1450:400c:c00::229]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UGVbi-00074U-NQ for linux-arm-kernel@lists.infradead.org; Fri, 15 Mar 2013 14:27:43 +0000 Received: by mail-wg0-f41.google.com with SMTP id ds1so603080wgb.4 for ; Fri, 15 Mar 2013 07:27:41 -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=YH2Tolp22A6ccPyVfu2G+A60E5BNLK0ZlDm/5/euJiw=; b=DEUAWlERNOLlDS1FiSBxUjjlA3MwH7/qiRRaC/vXpCpLQjZNK1wXIBX7ET8qW3Ew9V Lqp8oAvTYslThX6p0Kl3GFnUtpgY9U0XKLdS70dmP+vtKObu2Ezb2mjt3uo7dxV/3fSG 2c+rjuGZOIaPg6lJ2xFJhUYXRFGivZKO4CoWyb7zAPcC4TiFQmbDZF42ecfQrKyu81Nn WPl8VmYEJ/aTzgkGoK3nMCQg0g9h0Nimm14o0kz1mp9WhmHtEx5VY0qIFwii6V9pIoPk oLaPP/D33bW8t9VZGjSOJEJrS+Gv9Fs64NXXtpNTgjXyTWQx+y1RTWWe7d+QeOHtYe+7 21zQ== X-Received: by 10.180.97.166 with SMTP id eb6mr3330729wib.20.1363357661078; Fri, 15 Mar 2013 07:27:41 -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.38 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Mar 2013 07:27:40 -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 11/11] cpuidle / kirkwood : use common ARM cpuidle driver Date: Fri, 15 Mar 2013 15:27:10 +0100 Message-Id: <1363357630-22214-12-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: ALoCoQm2+4qDrfuhVOtDRbkR4YMvEygzmAV9IwMejSlT5oonrL1v113JKvhFa042Ka2RxqfuJIdV X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130315_102742_930558_662CD9BF X-CRM114-Status: GOOD ( 11.39 ) 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 --- drivers/cpuidle/cpuidle-kirkwood.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/cpuidle/cpuidle-kirkwood.c b/drivers/cpuidle/cpuidle-kirkwood.c index 670aa1e..60efdc5 100644 --- a/drivers/cpuidle/cpuidle-kirkwood.c +++ b/drivers/cpuidle/cpuidle-kirkwood.c @@ -53,9 +53,6 @@ static struct cpuidle_driver kirkwood_idle_driver = { }, .state_count = KIRKWOOD_MAX_STATES, }; -static struct cpuidle_device *device; - -static DEFINE_PER_CPU(struct cpuidle_device, kirkwood_cpuidle_device); /* Initialize CPU idle by registering the idle states */ static int kirkwood_cpuidle_probe(struct platform_device *pdev) @@ -70,22 +67,12 @@ static int kirkwood_cpuidle_probe(struct platform_device *pdev) if (!ddr_operation_base) return -EADDRNOTAVAIL; - device = &per_cpu(kirkwood_cpuidle_device, smp_processor_id()); - device->state_count = KIRKWOOD_MAX_STATES; - - cpuidle_register_driver(&kirkwood_idle_driver); - if (cpuidle_register_device(device)) { - pr_err("kirkwood_init_cpuidle: Failed registering\n"); - return -EIO; - } - return 0; + return arm_idle_init(&kirkwood_idle_driver); } int kirkwood_cpuidle_remove(struct platform_device *pdev) { - cpuidle_unregister_device(device); - cpuidle_unregister_driver(&kirkwood_idle_driver); - + arm_idle_exit(&kirkwood_idle_driver); return 0; }