From patchwork Wed Jun 25 12:45:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Dubey X-Patchwork-Id: 4420281 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6D7599F1D6 for ; Wed, 25 Jun 2014 12:51:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9AA8E20379 for ; Wed, 25 Jun 2014 12:51:37 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BF1F320148 for ; Wed, 25 Jun 2014 12:51:36 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wzmdd-0005Oz-5u; Wed, 25 Jun 2014 12:49:21 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WzmdQ-0005BM-7M for linux-arm-kernel@lists.infradead.org; Wed, 25 Jun 2014 12:49:08 +0000 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N7Q002HS69TJBC0@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 25 Jun 2014 21:49:05 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.125]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id F7.61.14704.145CAA35; Wed, 25 Jun 2014 21:49:05 +0900 (KST) X-AuditID: cbfee68f-b7fef6d000003970-63-53aac54160f1 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 09.79.04943.045CAA35; Wed, 25 Jun 2014 21:49:05 +0900 (KST) Received: from chromebld-server.sisodomain.com ([107.108.73.106]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N7Q0071J67S27A0@mmp2.samsung.com>; Wed, 25 Jun 2014 21:49:04 +0900 (KST) From: Pankaj Dubey To: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 2/6] ARM: EXYNOS: Move cpufreq and cpuidle device registration to init_machine Date: Wed, 25 Jun 2014 18:15:38 +0530 Message-id: <1403700342-9678-3-git-send-email-pankaj.dubey@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1403700342-9678-1-git-send-email-pankaj.dubey@samsung.com> References: <1403700342-9678-1-git-send-email-pankaj.dubey@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpmkeLIzCtJLcpLzFFi42JZI2JSq+t4dFWwwYMXHBbLJt1ls/i+6wu7 Re+Cq2wWmx5fY7W4vGsOm8WM8/uYLG5f5rX4dPQ/q8WirUAV62e8ZrG4+Ww7kwO3R0tzD5vH 5iX1Hn1bVjF6fN4kF8ASxWWTkpqTWZZapG+XwJXxsvMcc8Fpnoq/O3ewNjCe5epi5OSQEDCR mPbhNBuELSZx4d56IJuLQ0hgKaPE1FezWGCK3vxqZIdITGeUePjjASOEM4FJomfyJLB2NgFd iSfv5zKD2CIC2RL9t1ezgBQxC5xilJi9eRo7SEJYIFnizoI9TF2MHBwsAqoSDZdjQcK8Au4S P15cZQMJSwgoSMyZZAMS5hTwkHi06AbYEUJAJR0Nf8GOkBDYxi7x7c0sJpAEi4CAxLfJh1gg emUlNh1ghjhaUu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6o3dy37pHpnyVm7VZ9sbv1stIyqYW8v YH9dq3AjZi1TIleQu9SRh8dq/hmb8NYUJ+5ZtW9WB/OWAy8covd2nlPdM2dTnPD1f6ovD08/ fPGnjOGOz0//HfHQ/7q/ceKrzsIdeZfyZh9uXBTwkDv6ycPXC+vPVq049v+Oxgbbj9eXWRgr sRRnJBpqMRcVJwIAn9i61cUCAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140625_054908_436511_0C3D08B7 X-CRM114-Status: GOOD ( 10.91 ) X-Spam-Score: -5.0 (-----) Cc: kgene.kim@samsung.com, linux@arm.linux.org.uk, naushad@samsung.com, Pankaj Dubey , t.figa@samsung.com, joshi@samsung.com, vikas.sajjan@samsung.com, chow.kim@samsung.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As exynos_cpuidle_init and exynos_cpufreq_init function have just one lines of code for registering platform devices. We can move these lines to exynos_dt_machine_init and delete exynos_cpuidle_init and exynos_cpufreq_init function. This will help in reducing lines of code in exynos.c, making it more cleaner. Suggested-by: Tomasz Figa Signed-off-by: Pankaj Dubey Reviewed-by: Tomasz Figa --- arch/arm/mach-exynos/exynos.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index 6affcd9..e54d885 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -171,19 +171,6 @@ static struct platform_device exynos_cpuidle = { .id = -1, }; -void __init exynos_cpuidle_init(void) -{ - if (soc_is_exynos5440()) - return; - - platform_device_register(&exynos_cpuidle); -} - -void __init exynos_cpufreq_init(void) -{ - platform_device_register_simple("exynos-cpufreq", -1, NULL, 0); -} - static void __init exynos_init_late(void) { if (of_machine_is_compatible("samsung,exynos5440")) @@ -271,8 +258,10 @@ static void __init exynos_dt_machine_init(void) } } - exynos_cpuidle_init(); - exynos_cpufreq_init(); + if (!soc_is_exynos5440()) + platform_device_register(&exynos_cpuidle); + + platform_device_register_simple("exynos-cpufreq", -1, NULL, 0); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); }