diff options
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 11 | ||||
-rw-r--r-- | include/linux/cpufreq.h | 11 |
2 files changed, 9 insertions, 13 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 | *********************************************************************/ |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 9d803b529ac2..3f458896d45c 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -489,8 +489,15 @@ static inline void dev_pm_opp_free_cpufreq_table(struct device *dev, | |||
489 | } | 489 | } |
490 | #endif | 490 | #endif |
491 | 491 | ||
492 | 492 | static inline bool cpufreq_next_valid(struct cpufreq_frequency_table **pos) | |
493 | bool cpufreq_next_valid(struct cpufreq_frequency_table **pos); | 493 | { |
494 | while ((*pos)->frequency != CPUFREQ_TABLE_END) | ||
495 | if ((*pos)->frequency != CPUFREQ_ENTRY_INVALID) | ||
496 | return true; | ||
497 | else | ||
498 | (*pos)++; | ||
499 | return false; | ||
500 | } | ||
494 | 501 | ||
495 | /* | 502 | /* |
496 | * cpufreq_for_each_entry - iterate over a cpufreq_frequency_table | 503 | * cpufreq_for_each_entry - iterate over a cpufreq_frequency_table |