From patchwork Wed Apr 30 05:17:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Dubey X-Patchwork-Id: 4091321 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 5ECEB9F271 for ; Wed, 30 Apr 2014 05:03:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9AFF8201F4 for ; Wed, 30 Apr 2014 05:03:16 +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 C03BD201DE for ; Wed, 30 Apr 2014 05:03:15 +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 1WfMe2-00076Y-Cm; Wed, 30 Apr 2014 05:01:22 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WfMcu-0005dp-2P for linux-arm-kernel@lists.infradead.org; Wed, 30 Apr 2014 05:00:12 +0000 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N4T00JQ8V7G7270@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 30 Apr 2014 13:59:40 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.49]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 1E.BB.11120.B3380635; Wed, 30 Apr 2014 13:59:39 +0900 (KST) X-AuditID: cbfee68f-b7eff6d000002b70-c1-5360833bfd02 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 5B.C7.27725.B3380635; Wed, 30 Apr 2014 13:59:39 +0900 (KST) Received: from localhost.localdomain ([12.36.165.191]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N4T004J5V7A5170@mmp1.samsung.com>; Wed, 30 Apr 2014 13:59:39 +0900 (KST) From: Pankaj Dubey To: linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 02/12] ARM: EXYNOS: Move cpufreq and cpuidle device registration to init_machine Date: Wed, 30 Apr 2014 14:17:27 +0900 Message-id: <1398835057-3860-3-git-send-email-pankaj.dubey@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1398835057-3860-1-git-send-email-pankaj.dubey@samsung.com> References: <1398835057-3860-1-git-send-email-pankaj.dubey@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrHLMWRmVeSWpSXmKPExsVy+t8zQ13r5oRgg9/9uhbLJt1ls+hdcJXN YtPja6wWl3fNYbOYcX4fk8Xty7wWi7Z+YbdYP+M1i8XNZ9uZLHa0rGZx4PJoae5h89i8pN6j b8sqRo/Pm+QCWKK4bFJSczLLUov07RK4MhouT2ApmMtT8eLodZYGxiVcXYycHBICJhLN6xYw Q9hiEhfurWfrYuTiEBJYxiixcPNjFpii7S/vs0IkFjFKPJo7ixnCaWOS2Hr3GDtIFZuArsST 93PBRokIZEtcabwPVsQssJtRorFxHtBcDg5hgVSJaz9YQWpYBFQllq9czghi8wq4S/Sv+cYO UiIhoCAxZ5INSJhTwENi4e3fYOVCQCUNDT2MICMlBFaxSxy+/5wZYo6AxLfJh1ggemUlNh2A +kZS4uCKGywTGIUXMDKsYhRNLUguK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Mm98MPp2zSl8p6/2qskQhZxLqg4ceWQxGO78ufR2unM1Xozcu4nMR7V12XfUM7P cfHBh4hQoz0vLrbL9CgHKE5T7Cz+w//4NpvQ99vVM7kE0trCztkEbEs9c1aHRYmlOCPRUIu5 qDgRAJoQBm3uAgAA 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-20140429_220012_355059_8EE7A20E X-CRM114-Status: GOOD ( 11.14 ) X-Spam-Score: -5.7 (-----) Cc: kgene.kim@samsung.com, linux@arm.linux.org.uk, Pankaj Dubey , t.figa@samsung.com, yg1004.jang@samsung.com, vikas.sajjan@samsung.com, chow.kim@samsung.com 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 X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,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 --- 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 06dcce5..9315bd8 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -226,19 +226,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")) @@ -367,8 +354,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); }