From patchwork Tue Apr 23 14:41:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 16353 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ea0-f197.google.com (mail-ea0-f197.google.com [209.85.215.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B78B12391B for ; Tue, 23 Apr 2013 14:42:15 +0000 (UTC) Received: by mail-ea0-f197.google.com with SMTP id b15sf1021030eae.0 for ; Tue, 23 Apr 2013 07:41:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=/Te0u6ywTX9riV22BgaseOrXiS9XxwgB8QMvVISrO2o=; b=br3q7Dahuq5ZvA4Q2yREiXVM/7lNm/++/mrBDeOFi+79Z39nO0CEr+QjMaHmXHvtjV pGMlDE8YMnUYgVoO0bL73KJleein/9+EWg+SSwFXavgH8lLv9YkQj2X+i0geVyfr5FA2 cRx2ec9WSXXO5iql6kZw8sZwzwsn6quaoYqfvaNSQHwzeDJtSSSXhVmSoxejcq6OPKMP NMDgnW8sSNaHu/koezRfoHL6Iha8x1RRXnZvcG3BojVNQEgHEDsTMAOh6892RPzxfMZr Wm8+ToVTy3sbf/8QfPnTajemxQLoQmHp+EjAeomzmosnXbKLDyFYFiSr/onO5Wha8kLU MKTw== X-Received: by 10.180.96.225 with SMTP id dv1mr15389204wib.6.1366728086009; Tue, 23 Apr 2013 07:41:26 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.180.87.231 with SMTP id bb7ls228803wib.33.gmail; Tue, 23 Apr 2013 07:41:25 -0700 (PDT) X-Received: by 10.194.122.7 with SMTP id lo7mr39870777wjb.48.1366728085711; Tue, 23 Apr 2013 07:41:25 -0700 (PDT) Received: from mail-ve0-x22e.google.com (mail-ve0-x22e.google.com [2607:f8b0:400c:c01::22e]) by mx.google.com with ESMTPS id fs14si6327079wic.84.2013.04.23.07.41.25 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 23 Apr 2013 07:41:25 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::22e is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::22e; Received: by mail-ve0-f174.google.com with SMTP id b10so259914vea.19 for ; Tue, 23 Apr 2013 07:41:24 -0700 (PDT) X-Received: by 10.52.34.168 with SMTP id a8mr19250397vdj.75.1366728084620; Tue, 23 Apr 2013 07:41:24 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp128582veb; Tue, 23 Apr 2013 07:41:23 -0700 (PDT) X-Received: by 10.180.104.197 with SMTP id gg5mr21085327wib.13.1366728083329; Tue, 23 Apr 2013 07:41:23 -0700 (PDT) Received: from mail-we0-x22c.google.com (mail-we0-x22c.google.com [2a00:1450:400c:c03::22c]) by mx.google.com with ESMTPS id f12si10730760wjs.205.2013.04.23.07.41.22 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 23 Apr 2013 07:41:23 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c03::22c is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=2a00:1450:400c:c03::22c; Received: by mail-we0-f172.google.com with SMTP id r3so675436wey.17 for ; Tue, 23 Apr 2013 07:41:22 -0700 (PDT) X-Received: by 10.194.173.167 with SMTP id bl7mr62034207wjc.50.1366728082665; Tue, 23 Apr 2013 07:41:22 -0700 (PDT) Received: from mai.home (AToulouse-654-1-479-219.w86-201.abo.wanadoo.fr. [86.201.194.219]) by mx.google.com with ESMTPSA id ek4sm26626981wib.11.2013.04.23.07.41.20 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 23 Apr 2013 07:41:21 -0700 (PDT) From: Daniel Lezcano To: Cc: ben-linux@fluff.org, kgene.kim@samsung.com, horms+renesas@verge.net.au, lethal@linux-sh.org, patches@linaro.org, linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org Subject: [PATCH 2/2] SH: cpuidle: use init/exit common routine Date: Tue, 23 Apr 2013 16:41:17 +0200 Message-Id: <1366728077-18988-2-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1366728077-18988-1-git-send-email-daniel.lezcano@linaro.org> References: <1366728077-18988-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQm8WI02ur/AQG09cZU33arzT1+lw5ekLgW9vsxvj8rZm5A7ZKkfK5IBTl7nq6xfV1ByE51k X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::22e is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Remove the duplicated code and use the cpuidle common code for initialization. Signed-off-by: Daniel Lezcano Acked-by: Simon Horman --- arch/sh/kernel/cpu/shmobile/cpuidle.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/sh/kernel/cpu/shmobile/cpuidle.c b/arch/sh/kernel/cpu/shmobile/cpuidle.c index fdfe57f4..d306225 100644 --- a/arch/sh/kernel/cpu/shmobile/cpuidle.c +++ b/arch/sh/kernel/cpu/shmobile/cpuidle.c @@ -51,7 +51,6 @@ static int cpuidle_sleep_enter(struct cpuidle_device *dev, return k; } -static struct cpuidle_device cpuidle_dev; static struct cpuidle_driver cpuidle_driver = { .name = "sh_idle", .owner = THIS_MODULE, @@ -100,9 +99,5 @@ int __init sh_mobile_setup_cpuidle(void) if (sh_mobile_sleep_supported & SUSP_SH_STANDBY) cpuidle_driver.states[2].disabled = false; - ret = cpuidle_register_driver(&cpuidle_driver); - if (ret) - return ret; - - return cpuidle_register_device(&cpuidle_dev); + return cpuidle_register(&cpuidle_driver); }