From patchwork Thu Feb 21 11:04:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 2171221 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 1DD123FCA4 for ; Thu, 21 Feb 2013 11:07:48 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U8TxB-000405-GN; Thu, 21 Feb 2013 11:04:41 +0000 Received: from am1ehsobe005.messaging.microsoft.com ([213.199.154.208] helo=am1outboundpool.messaging.microsoft.com) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U8Tx9-0003zk-9h for linux-arm-kernel@lists.infradead.org; Thu, 21 Feb 2013 11:04:39 +0000 Received: from mail18-am1-R.bigfish.com (10.3.201.238) by AM1EHSOBE024.bigfish.com (10.3.207.146) with Microsoft SMTP Server id 14.1.225.23; Thu, 21 Feb 2013 11:04:35 +0000 Received: from mail18-am1 (localhost [127.0.0.1]) by mail18-am1-R.bigfish.com (Postfix) with ESMTP id 76C662A0182; Thu, 21 Feb 2013 11:04:35 +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: 0 X-BigFish: VS0(zzc89bhzz1f42h1ee6h1de0h1202h1e76h1d1ah1d2ahzz8275bh8275dhz2dh87h2a8h668h839h93fhd24he5bhf0ah1288h12a5h12a9h12bdh137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1155h) X-FB-DOMAIN-IP-MATCH: fail Received: from mail18-am1 (localhost.localdomain [127.0.0.1]) by mail18-am1 (MessageSwitch) id 1361444670653655_17540; Thu, 21 Feb 2013 11:04:30 +0000 (UTC) Received: from AM1EHSMHS001.bigfish.com (unknown [10.3.201.229]) by mail18-am1.bigfish.com (Postfix) with ESMTP id 9630330006F; Thu, 21 Feb 2013 11:04:30 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by AM1EHSMHS001.bigfish.com (10.3.207.101) with Microsoft SMTP Server (TLS) id 14.1.225.23; Thu, 21 Feb 2013 11:04:23 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-004.039d.mgd.msft.net (10.84.1.14) with Microsoft SMTP Server (TLS) id 14.2.328.11; Thu, 21 Feb 2013 11:04:19 +0000 Received: from S2101-09.ap.freescale.net ([10.192.185.44]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id r1LB4Fls007026; Thu, 21 Feb 2013 04:04:16 -0700 From: Shawn Guo To: Subject: [PATCH] PM / OPP: fix condition for empty of_init_opp_table() Date: Thu, 21 Feb 2013 19:04:45 +0800 Message-ID: <1361444685-1034-1-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-OriginatorOrg: sigmatel.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130221_060439_540802_F2408E0C X-CRM114-Status: UNSURE ( 9.98 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [213.199.154.208 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: "Rafael J. Wysocki" , Shawn Guo , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org randconfig build reports the following error which is caused by that CONFIG_PM_OPP is unset. CC arch/arm/mach-imx/mach-imx6q.o arch/arm/mach-imx/mach-imx6q.c: In function ‘imx6q_opp_init’: arch/arm/mach-imx/mach-imx6q.c:248:2: error: implicit declaration of function ‘of_init_opp_table’ [-Werror=implicit-function-declaration] Fix the error by giving a more correct condition for empty of_init_opp_table() implementation. Reported-by: Rob Herring Signed-off-by: Shawn Guo Acked-by: Nishanth Menon --- include/linux/opp.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/include/linux/opp.h b/include/linux/opp.h index 214e0eb..3aca2b8 100644 --- a/include/linux/opp.h +++ b/include/linux/opp.h @@ -47,15 +47,6 @@ int opp_enable(struct device *dev, unsigned long freq); int opp_disable(struct device *dev, unsigned long freq); struct srcu_notifier_head *opp_get_notifier(struct device *dev); - -#ifdef CONFIG_OF -int of_init_opp_table(struct device *dev); -#else -static inline int of_init_opp_table(struct device *dev) -{ - return -EINVAL; -} -#endif /* CONFIG_OF */ #else static inline unsigned long opp_get_voltage(struct opp *opp) { @@ -112,6 +103,15 @@ static inline struct srcu_notifier_head *opp_get_notifier(struct device *dev) } #endif /* CONFIG_PM_OPP */ +#if defined(CONFIG_PM_OPP) && defined(CONFIG_OF) +int of_init_opp_table(struct device *dev); +#else +static inline int of_init_opp_table(struct device *dev) +{ + return -EINVAL; +} +#endif + #if defined(CONFIG_CPU_FREQ) && defined(CONFIG_PM_OPP) int opp_init_cpufreq_table(struct device *dev, struct cpufreq_frequency_table **table);