From patchwork Mon Jul 7 03:50:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Dubey X-Patchwork-Id: 4492301 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E9E2EBEEAA for ; Mon, 7 Jul 2014 03:55:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2CF0120222 for ; Mon, 7 Jul 2014 03:55:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 409F7201F4 for ; Mon, 7 Jul 2014 03:55:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752921AbaGGDxs (ORCPT ); Sun, 6 Jul 2014 23:53:48 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:13478 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752854AbaGGDxj (ORCPT ); Sun, 6 Jul 2014 23:53:39 -0400 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 <0N8B00IJKPHD9O10@mailout2.samsung.com>; Mon, 07 Jul 2014 12:53:37 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.124]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 61.A2.14704.1C91AB35; Mon, 07 Jul 2014 12:53:37 +0900 (KST) X-AuditID: cbfee68f-b7fef6d000003970-2b-53ba19c1bf5c Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id C1.9B.04943.1C91AB35; Mon, 07 Jul 2014 12:53:37 +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 <0N8B00G14PH17141@mmp2.samsung.com>; Mon, 07 Jul 2014 12:53:37 +0900 (KST) From: Pankaj Dubey To: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: kgene.kim@samsung.com, linux@arm.linux.org.uk, t.figa@samsung.com, vikas.sajjan@samsung.com, joshi@samsung.com, naushad@samsung.com, chow.kim@samsung.com, Pankaj Dubey Subject: [PATCH v6 2/6] ARM: EXYNOS: Move cpufreq and cpuidle device registration to init_machine Date: Mon, 07 Jul 2014 09:20:52 +0530 Message-id: <1404705056-11965-3-git-send-email-pankaj.dubey@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1404705056-11965-1-git-send-email-pankaj.dubey@samsung.com> References: <1404705056-11965-1-git-send-email-pankaj.dubey@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmphkeLIzCtJLcpLzFFi42JZI2JSo3tQclewwYPnshbLJt1ls/i+6wu7 Re+Cq2wWmx5fY7W4vGsOm8WM8/uYLG5f5rX4dPQ/q8WirUAV62e8ZrG4+Ww7kwO3R0tzD5vH 5iX1Hn1bVjF6fN4kF8ASxWWTkpqTWZZapG+XwJVxcPJmtoLXvBU7Jx5ga2B8yN3FyMkhIWAi MaXjLTOELSZx4d56ti5GLg4hgaWMEitOz2GCKXq5cTM7RGI6o8Tus/dZIZwJTBJPei+xgFSx CehKPHk/F2yUiEC2RP/t1SwgRcwCpxglZm+exg6SEBZIlni1bT+YzSKgKjHx81E2EJtXwEPi 17uXQHEOoHUKEnMm2YCEOQU8JZZ8mAQ2Uwio5O65Q4wgMyUE1rFLnFp3gAlijoDEt8mHWCB6 ZSU2HYB6R1Li4IobLBMYhRcwMq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f6a JZVzLj9y75gT8cY1uSTr8fTKL3YninalZarYvZJfnu8Z7vk2Ti0q8vPU6PfKTX5zHr37dHjS NuWYUMbf1z4fuCwRdZJR4uSZtt8/nhwQ7vq195JEblva/Znqlg6z55lEn8u8d6xxvxJLcUai oRZzUXEiAElY1iXGAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index ff60b4c..47170eb 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); -} - void __iomem *sysram_base_addr; void __iomem *sysram_ns_base_addr; @@ -300,10 +287,11 @@ static void __init exynos_dt_machine_init(void) if (!IS_ENABLED(CONFIG_SMP)) exynos_sysram_init(); - if (!of_machine_is_compatible("samsung,exynos5420")) - exynos_cpuidle_init(); + if (!of_machine_is_compatible("samsung,exynos5420") || + !of_machine_is_compatible("samsung,exynos5440")) + platform_device_register(&exynos_cpuidle); - exynos_cpufreq_init(); + platform_device_register_simple("exynos-cpufreq", -1, NULL, 0); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); }