From patchwork Thu Jul 18 12:54:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 18417 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f199.google.com (mail-vc0-f199.google.com [209.85.220.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A045125E5B for ; Thu, 18 Jul 2013 12:54:37 +0000 (UTC) Received: by mail-vc0-f199.google.com with SMTP id hz11sf1730000vcb.2 for ; Thu, 18 Jul 2013 05:54:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to: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=x5xqUEsaQrNT7wuTojP0i2SAbV1MqPqghUXchoIJvbA=; b=M/nH2USTgQPTm3cbLmEoqA7x0Z8Ja5zitymsRyWiQ9wdG7W2VPpE2bobXJnqzjPmck 6V7p89xZb75JQsveXLwiTLg2DDII2Jdk4hVlTvULFFrKkMbfKZRS6zNop78SpArNbO58 epGPtEU+O1uL7Sh/5uo48J4/bGz/yFAKU5PnZdx8k6jE1egiC0I0/8hnf0JlC+XrI1cD wXzQaaaIBqve7tgYrum5dxLE0n2ci+OBJA2Ht75/SDmMfMzvQppiwogBf9iyOSsAKLhf q5ycdjdyWA9Iv071V+0bhkbr1gXSdi7Ju0PrwRqjQrtf4Z635PuXaQ9oJ8sTrY/KT49h ebzA== X-Received: by 10.236.93.113 with SMTP id k77mr6242181yhf.25.1374152077248; Thu, 18 Jul 2013 05:54:37 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.71.114 with SMTP id t18ls1310293qeu.61.gmail; Thu, 18 Jul 2013 05:54:37 -0700 (PDT) X-Received: by 10.52.68.108 with SMTP id v12mr3284973vdt.79.1374152077109; Thu, 18 Jul 2013 05:54:37 -0700 (PDT) Received: from mail-vb0-f50.google.com (mail-vb0-f50.google.com [209.85.212.50]) by mx.google.com with ESMTPS id ha3si2754082vdb.4.2013.07.18.05.54.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Jul 2013 05:54:37 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.50 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.50; Received: by mail-vb0-f50.google.com with SMTP id w16so2288916vbb.23 for ; Thu, 18 Jul 2013 05:54:37 -0700 (PDT) X-Received: by 10.52.23.83 with SMTP id k19mr3164771vdf.106.1374152077005; Thu, 18 Jul 2013 05:54:37 -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.220.149.77 with SMTP id s13csp223394vcv; Thu, 18 Jul 2013 05:54:36 -0700 (PDT) X-Received: by 10.194.110.39 with SMTP id hx7mr8437101wjb.4.1374152076034; Thu, 18 Jul 2013 05:54:36 -0700 (PDT) Received: from mail-we0-f172.google.com (mail-we0-f172.google.com [74.125.82.172]) by mx.google.com with ESMTPS id gc4si4055414wic.85.2013.07.18.05.54.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Jul 2013 05:54:36 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.172 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=74.125.82.172; Received: by mail-we0-f172.google.com with SMTP id q56so2897167wes.31 for ; Thu, 18 Jul 2013 05:54:35 -0700 (PDT) X-Received: by 10.180.75.41 with SMTP id z9mr8042480wiv.22.1374152075614; Thu, 18 Jul 2013 05:54:35 -0700 (PDT) Received: from mai.home (AToulouse-654-1-413-126.w82-125.abo.wanadoo.fr. [82.125.160.126]) by mx.google.com with ESMTPSA id r8sm16369267wiy.8.2013.07.18.05.54.33 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Jul 2013 05:54:34 -0700 (PDT) From: Daniel Lezcano To: kgene.kim@samsung.com, rjw@sisk.pl Cc: linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, patches@linaro.org, linaro-kernel@lists.linaro.org Subject: [PATCH 2/4] ARM: exynos: cpuidle: Use the common cpuidle register routine Date: Thu, 18 Jul 2013 14:54:28 +0200 Message-Id: <1374152070-21008-2-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1374152070-21008-1-git-send-email-daniel.lezcano@linaro.org> References: <1374152070-21008-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQknMpyYG9wUOoGMl2hBinb440WEQRnai0onwtA6thCqn1AfxGx7WchtJK6w1iqFKVzzrsQ0 X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.50 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: , Now we have the same routine than the one handled by the cpuidle framework. Let's use it. Signed-off-by: Daniel Lezcano --- arch/arm/mach-exynos/cpuidle.c | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c index cc4b097..d8fc1a2 100644 --- a/arch/arm/mach-exynos/cpuidle.c +++ b/arch/arm/mach-exynos/cpuidle.c @@ -41,8 +41,6 @@ static int exynos4_enter_lowpower(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index); -static DEFINE_PER_CPU(struct cpuidle_device, exynos4_cpuidle_device); - static struct cpuidle_driver exynos4_idle_driver = { .name = "exynos4_idle", .owner = THIS_MODULE, @@ -188,29 +186,9 @@ static void __init exynos5_core_down_clk(void) static int __init exynos4_init_cpuidle(void) { - int cpu_id, ret; - struct cpuidle_device *device; - if (soc_is_exynos5250()) exynos5_core_down_clk(); - ret = cpuidle_register_driver(&exynos4_idle_driver); - if (ret) { - printk(KERN_ERR "CPUidle failed to register driver\n"); - return ret; - } - - for_each_online_cpu(cpu_id) { - device = &per_cpu(exynos4_cpuidle_device, cpu_id); - device->cpu = cpu_id; - - ret = cpuidle_register_device(device); - if (ret) { - printk(KERN_ERR "CPUidle register device failed\n"); - return ret; - } - } - - return 0; + return cpuidle_register(&exynos4_idle_driver, NULL); } device_initcall(exynos4_init_cpuidle);