aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/cpu-freq/cpu-drivers.txt
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2016-06-03 01:28:51 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-06-08 18:58:06 -0400
commitd218ed773915a2b762d132be6bb765637338c360 (patch)
tree12e1e64d24fc80cbadff5285a439d441ed186c2f /Documentation/cpu-freq/cpu-drivers.txt
parent2372784542cb7a8b256a740840abf4503de0d669 (diff)
cpufreq: Return index from cpufreq_frequency_table_target()
This routine can't fail unless the frequency table is invalid and doesn't contain any valid entries. Make it return the index and WARN() in case it is used for an invalid table. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'Documentation/cpu-freq/cpu-drivers.txt')
-rw-r--r--Documentation/cpu-freq/cpu-drivers.txt7
1 files changed, 3 insertions, 4 deletions
diff --git a/Documentation/cpu-freq/cpu-drivers.txt b/Documentation/cpu-freq/cpu-drivers.txt
index 74e812f0719c..772b94fde264 100644
--- a/Documentation/cpu-freq/cpu-drivers.txt
+++ b/Documentation/cpu-freq/cpu-drivers.txt
@@ -245,12 +245,11 @@ policy->max, and all other criteria are met. This is helpful for the
245 245
246int cpufreq_frequency_table_target(struct cpufreq_policy *policy, 246int cpufreq_frequency_table_target(struct cpufreq_policy *policy,
247 unsigned int target_freq, 247 unsigned int target_freq,
248 unsigned int relation, 248 unsigned int relation);
249 unsigned int *index);
250 249
251is the corresponding frequency table helper for the ->target 250is the corresponding frequency table helper for the ->target
252stage. Just pass the values to this function, and the unsigned int 251stage. Just pass the values to this function, and this function
253index returns the number of the frequency table entry which contains 252returns the number of the frequency table entry which contains
254the frequency the CPU shall be set to. 253the frequency the CPU shall be set to.
255 254
256The following macros can be used as iterators over cpufreq_frequency_table: 255The following macros can be used as iterators over cpufreq_frequency_table: