Skip to contentSkip to conversation

PM / OPP: Fix build when CONFIG_PM_OPP is not set

PATCH Applied Tony Lindgren 2 participants 2 messages Nov 2, 2011 – Nov 3, 2011

lore
Share & tools
lore
#0 lore raw

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.

Cc MyungJoo Ham <[email protected]>
Cc Kyungmin Park <[email protected]>
Cc Mike Turquette <[email protected]>
Cc Kevin Hilman <[email protected]>
Cc Rafael J. Wysocki <[email protected]>

---

I'm seeing this with omap1_defconfig at least.

include/linux/opp.h +2 -2
@@ -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,
#1 lore raw
Quoted 8 lines · Tony Lindgren

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

Quoted 8 lines

Also fix incorrect comment.

Cc MyungJoo Ham <[email protected]>
Cc Kyungmin Park <[email protected]>
Cc Mike Turquette <[email protected]>
Cc Kevin Hilman <[email protected]>
Cc Rafael J. Wysocki <[email protected]>

Applied to linux-pm/linux-next.

Thanks,
Rafael

Quoted 22 lines

---

I'm seeing this with omap1_defconfig at least.

include/linux/opp.h +2 -2
@@ -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,