From patchwork Mon Sep 9 14:32:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 2861461 Return-Path: X-Original-To: patchwork-linux-arm@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 5874ABF43F for ; Mon, 9 Sep 2013 14:33:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A088520136 for ; Mon, 9 Sep 2013 14:33:35 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E8AD820107 for ; Mon, 9 Sep 2013 14:33:33 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VJ2Wp-000730-PY; Mon, 09 Sep 2013 14:33:24 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VJ2Wn-0007ol-Gn; Mon, 09 Sep 2013 14:33:21 +0000 Received: from co1ehsobe004.messaging.microsoft.com ([216.32.180.187] helo=co1outboundpool.messaging.microsoft.com) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VJ2Wk-0007nx-0E for linux-arm-kernel@lists.infradead.org; Mon, 09 Sep 2013 14:33:19 +0000 Received: from mail130-co1-R.bigfish.com (10.243.78.247) by CO1EHSOBE032.bigfish.com (10.243.66.97) with Microsoft SMTP Server id 14.1.225.22; Mon, 9 Sep 2013 14:32:51 +0000 Received: from mail130-co1 (localhost [127.0.0.1]) by mail130-co1-R.bigfish.com (Postfix) with ESMTP id 788151800F2; Mon, 9 Sep 2013 14:32:51 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: -2 X-BigFish: VS-2(zz98dI1432Izz1f42h208ch1ee6h1de0h1fdah2073h1202h1e76h1d1ah1d2ah1fc6hzz1de097hz2dh87h2a8h839h944hd25hf0ah1220h1288h12a5h12a9h12bdh137ah13b6h1441h1504h1537h153bh162dh1631h1758h18e1h1946h19b5h1ad9h1b0ah1b2fh1fb3h1d0ch1d2eh1d3fh1dfeh1dffh1fe8h1ff5h209eh1151h1155h) X-FB-DOMAIN-IP-MATCH: fail Received: from mail130-co1 (localhost.localdomain [127.0.0.1]) by mail130-co1 (MessageSwitch) id 1378737169112853_945; Mon, 9 Sep 2013 14:32:49 +0000 (UTC) Received: from CO1EHSMHS003.bigfish.com (unknown [10.243.78.246]) by mail130-co1.bigfish.com (Postfix) with ESMTP id 0A4B9400041; Mon, 9 Sep 2013 14:32:49 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CO1EHSMHS003.bigfish.com (10.243.66.13) with Microsoft SMTP Server (TLS) id 14.16.227.3; Mon, 9 Sep 2013 14:32:48 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server (TLS) id 14.3.158.2; Mon, 9 Sep 2013 14:32:47 +0000 Received: from S2101-09.ap.freescale.net ([10.192.185.21]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id r89EWbQV005148; Mon, 9 Sep 2013 07:32:39 -0700 Date: Mon, 9 Sep 2013 22:32:55 +0800 From: Shawn Guo To: Sudeep KarkadaNagesha Subject: Re: [PATCH v4 12/19] cpufreq: cpufreq-cpu0: remove device tree parsing for cpu nodes Message-ID: <20130909143253.GD4624@S2101-09.ap.freescale.net> References: <1374492747-13879-1-git-send-email-Sudeep.KarkadaNagesha@arm.com> <1376991021-12160-1-git-send-email-Sudeep.KarkadaNagesha@arm.com> <1376991021-12160-13-git-send-email-Sudeep.KarkadaNagesha@arm.com> <522D93D7.4010307@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <522D93D7.4010307@arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-OriginatorOrg: sigmatel.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130909_103318_215464_9B9C1F3B X-CRM114-Status: GOOD ( 19.16 ) X-Spam-Score: -2.6 (--) Cc: Jonas Bonn , "devicetree@vger.kernel.org" , Michal Simek , Benjamin Herrenschmidt , "linux-pm@vger.kernel.org" , Viresh Kumar , "linux-kernel@vger.kernel.org" , "rob.herring@calxeda.com" , "Rafael J. Wysocki" , Greg Kroah-Hartman , "grant.likely@linaro.org" , "linuxppc-dev@lists.ozlabs.org" , Guennadi Liakhovetski , "linux-arm-kernel@lists.infradead.org" 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 Hi Sudeep, On Mon, Sep 09, 2013 at 10:24:39AM +0100, Sudeep KarkadaNagesha wrote: > Hi Shawn, > > Can you please clarify ? The fix would be as below but I would like to > know if setting cpu_dev to get_cpu_device(0) instead of &pdev->dev has > any impact on other parts of code using cpu_dev ? I'm sorry. I should have given it a test on hardware before ACKing the changes. The fix below should not have other impact except the prefix of dev_err [info, dbg] message output ('cpufreq-cpu0:' to 'cpu cpu0:'), which shouldn't be a problem. > > diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c > index cbfffa9..871c336 100644 > --- a/drivers/cpufreq/cpufreq-cpu0.c > +++ b/drivers/cpufreq/cpufreq-cpu0.c > @@ -177,7 +177,7 @@ static int cpu0_cpufreq_probe(struct platform_device > *pdev) > struct device_node *np; > int ret; > > - cpu_dev = &pdev->dev; > + cpu_dev = get_cpu_device(0); > > np = of_node_get(cpu_dev->of_node); > if (!np) { > The imx6q-cpufreq driver needs a similar fixing. Please include the following changes into your fixing patches. Thanks. Shawn ---8<--------- diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 85a1b51..69fd4b6 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c @@ -233,9 +233,10 @@ put_node: of_node_put(np); } -static void __init imx6q_opp_init(struct device *cpu_dev) +static void __init imx6q_opp_init(void) { struct device_node *np; + struct device *cpu_dev = get_cpu_device(0); np = of_node_get(cpu_dev->of_node); if (!np) { @@ -268,7 +269,7 @@ static void __init imx6q_init_late(void) imx6q_cpuidle_init(); if (IS_ENABLED(CONFIG_ARM_IMX6Q_CPUFREQ)) { - imx6q_opp_init(&imx6q_cpufreq_pdev.dev); + imx6q_opp_init(); platform_device_register(&imx6q_cpufreq_pdev); } } diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c index 3e39654..d7ebd91 100644 --- a/drivers/cpufreq/imx6q-cpufreq.c +++ b/drivers/cpufreq/imx6q-cpufreq.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include @@ -202,7 +203,7 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev) unsigned long min_volt, max_volt; int num, ret; - cpu_dev = &pdev->dev; + cpu_dev = get_cpu_device(0); np = of_node_get(cpu_dev->of_node); if (!np) {