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: 2861441 Return-Path: X-Original-To: patchwork-linux-pm@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 047CB9F2D6 for ; Mon, 9 Sep 2013 14:32:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BFDB920136 for ; Mon, 9 Sep 2013 14:32:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 973D72021C for ; Mon, 9 Sep 2013 14:32:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754010Ab3IIOcx (ORCPT ); Mon, 9 Sep 2013 10:32:53 -0400 Received: from co1ehsobe002.messaging.microsoft.com ([216.32.180.185]:38338 "EHLO co1outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754008Ab3IIOcw (ORCPT ); Mon, 9 Sep 2013 10:32:52 -0400 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 CC: Guennadi Liakhovetski , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linux-pm@vger.kernel.org" , "devicetree@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , Viresh Kumar , Greg Kroah-Hartman , Benjamin Herrenschmidt , Jonas Bonn , Michal Simek , "Rafael J. Wysocki" , "grant.likely@linaro.org" , "rob.herring@calxeda.com" 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% Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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<--------- --- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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) {