From: Tony Lindgren Date: Thu, 3 Nov 2011 09:12:27 +0000 (+0100) Subject: PM / OPP: Fix build when CONFIG_PM_OPP is not set X-Git-Tag: next-20111104~16^2~5 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=16e1618ebf6e604ec8079246b46d8fb73f5900b1;p=karo-tx-linux.git PM / OPP: Fix build when CONFIG_PM_OPP is not set Commit 03ca370fbf7b76d6d002380dbdc2cdc2319f9c80 (PM / OPP: Add OPP availability change notifier) does not compile if CONFIG_PM_OPP is not set: arch/arm/plat-omap/omap-pm-noop.o: In function `opp_get_notifier': include/linux/opp.h:103: multiple definition of `opp_get_notifier' include/linux/opp.h:103: first defined here Also fix incorrect comment. Signed-off-by: Tony Lindgren Signed-off-by: Rafael J. Wysocki --- diff --git a/include/linux/opp.h b/include/linux/opp.h index 87a9208f8aec..ee94b33080c2 100644 --- a/include/linux/opp.h +++ b/include/linux/opp.h @@ -97,11 +97,11 @@ static inline int opp_disable(struct device *dev, unsigned long freq) return 0; } -struct srcu_notifier_head *opp_get_notifier(struct device *dev) +static inline struct srcu_notifier_head *opp_get_notifier(struct device *dev) { return ERR_PTR(-EINVAL); } -#endif /* CONFIG_PM */ +#endif /* CONFIG_PM_OPP */ #if defined(CONFIG_CPU_FREQ) && defined(CONFIG_PM_OPP) int opp_init_cpufreq_table(struct device *dev,