diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2013-02-21 06:04:45 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-02-22 18:30:08 -0500 |
commit | d6561bb206aae9de8eee4516549339ee96386b87 (patch) | |
tree | 5a66c61720d0608edbf85c3d917d18a880301d93 /include/linux/opp.h | |
parent | 6be264986152c498562f26b15ed73c70aa37ce48 (diff) |
PM / OPP: fix condition for empty of_init_opp_table()
randconfig build reports the following error which is caused by
CONFIG_PM_OPP being 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 <robherring2@gmail.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/opp.h')
-rw-r--r-- | include/linux/opp.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/linux/opp.h b/include/linux/opp.h index 214e0ebcb84d..3aca2b8def33 100644 --- a/include/linux/opp.h +++ b/include/linux/opp.h | |||
@@ -47,15 +47,6 @@ int opp_enable(struct device *dev, unsigned long freq); | |||
47 | int opp_disable(struct device *dev, unsigned long freq); | 47 | int opp_disable(struct device *dev, unsigned long freq); |
48 | 48 | ||
49 | struct srcu_notifier_head *opp_get_notifier(struct device *dev); | 49 | struct srcu_notifier_head *opp_get_notifier(struct device *dev); |
50 | |||
51 | #ifdef CONFIG_OF | ||
52 | int of_init_opp_table(struct device *dev); | ||
53 | #else | ||
54 | static inline int of_init_opp_table(struct device *dev) | ||
55 | { | ||
56 | return -EINVAL; | ||
57 | } | ||
58 | #endif /* CONFIG_OF */ | ||
59 | #else | 50 | #else |
60 | static inline unsigned long opp_get_voltage(struct opp *opp) | 51 | static inline unsigned long opp_get_voltage(struct opp *opp) |
61 | { | 52 | { |
@@ -112,6 +103,15 @@ static inline struct srcu_notifier_head *opp_get_notifier(struct device *dev) | |||
112 | } | 103 | } |
113 | #endif /* CONFIG_PM_OPP */ | 104 | #endif /* CONFIG_PM_OPP */ |
114 | 105 | ||
106 | #if defined(CONFIG_PM_OPP) && defined(CONFIG_OF) | ||
107 | int of_init_opp_table(struct device *dev); | ||
108 | #else | ||
109 | static inline int of_init_opp_table(struct device *dev) | ||
110 | { | ||
111 | return -EINVAL; | ||
112 | } | ||
113 | #endif | ||
114 | |||
115 | #if defined(CONFIG_CPU_FREQ) && defined(CONFIG_PM_OPP) | 115 | #if defined(CONFIG_CPU_FREQ) && defined(CONFIG_PM_OPP) |
116 | int opp_init_cpufreq_table(struct device *dev, | 116 | int opp_init_cpufreq_table(struct device *dev, |
117 | struct cpufreq_frequency_table **table); | 117 | struct cpufreq_frequency_table **table); |