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: 4420161 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 8C891BEEAA for ; Wed, 25 Jun 2014 12:49:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B05572038E for ; Wed, 25 Jun 2014 12:49:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C5D8420381 for ; Wed, 25 Jun 2014 12:49:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756723AbaFYMtH (ORCPT ); Wed, 25 Jun 2014 08:49:07 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:50111 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755297AbaFYMtG (ORCPT ); Wed, 25 Jun 2014 08:49:06 -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 <0N7Q002HS69TJBC0@mailout2.samsung.com>; 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 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 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 emUlNh1ghjhaUuLgihssExiFFzAyrGIUTS1ILihO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stIyqYW8v YH9dq3AjZi1TIleQu9SRh8dq/hmb8NYUJ+5ZtW9WB/OWAy8covd2nlPdM2dTnPD1f6ovD08/ fPGnjOGOz0//HfHQ/7q/ceKrzsIdeZfyZh9uXBTwkDv6ycPXC+vPVq049v+Oxgbbj9eXWRgr sRRnJBpqMRcVJwIAn9i61cUCAAA= 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=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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); }