diff options
author | Stratos Karafotis <stratosk@semaphore.gr> | 2014-05-07 12:33:33 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-05-08 07:10:56 -0400 |
commit | 5eeaf1f1897372590105f155c6a7110b3fa36aef (patch) | |
tree | 704d8bb4d23fc7aa8dd983588963d4eb1f9cd8a2 /drivers/cpufreq | |
parent | 37c147948742d34bdc3d9b491f99c77fc48daac0 (diff) |
cpufreq: Fix build error on some platforms that use cpufreq_for_each_*
On platforms that use cpufreq_for_each_* macros, build fails if
CONFIG_CPU_FREQ=n, e.g. ARM/shmobile/koelsch/non-multiplatform:
drivers/built-in.o: In function `clk_round_parent':
clkdev.c:(.text+0xcf168): undefined reference to `cpufreq_next_valid'
drivers/built-in.o: In function `clk_rate_table_find':
clkdev.c:(.text+0xcf820): undefined reference to `cpufreq_next_valid'
make[3]: *** [vmlinux] Error 1
Fix this making cpufreq_next_valid function inline and move it to
cpufreq.h.
Fixes: 27e289dce297 (cpufreq: Introduce macros for cpufreq_frequency_table iteration)
Reported-and-tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index bfe82b63875f..a05c92198b9f 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -237,17 +237,6 @@ void cpufreq_cpu_put(struct cpufreq_policy *policy) | |||
237 | } | 237 | } |
238 | EXPORT_SYMBOL_GPL(cpufreq_cpu_put); | 238 | EXPORT_SYMBOL_GPL(cpufreq_cpu_put); |
239 | 239 | ||
240 | bool cpufreq_next_valid(struct cpufreq_frequency_table **pos) | ||
241 | { | ||
242 | while ((*pos)->frequency != CPUFREQ_TABLE_END) | ||
243 | if ((*pos)->frequency != CPUFREQ_ENTRY_INVALID) | ||
244 | return true; | ||
245 | else | ||
246 | (*pos)++; | ||
247 | return false; | ||
248 | } | ||
249 | EXPORT_SYMBOL_GPL(cpufreq_next_valid); | ||
250 | |||
251 | /********************************************************************* | 240 | /********************************************************************* |
252 | * EXTERNALLY AFFECTING FREQUENCY CHANGES * | 241 | * EXTERNALLY AFFECTING FREQUENCY CHANGES * |
253 | *********************************************************************/ | 242 | *********************************************************************/ |