diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-03-05 05:44:04 -0500 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-03-07 04:55:29 -0500 |
| commit | 5d094fea148dc35e2e5664d297b82494322704cd (patch) | |
| tree | 44fcb2e2c8b76ef4f427ddffc63069207cb16ae5 | |
| parent | ef8006846a3a97d9d8bf49e63dba948d0d2dbbf0 (diff) | |
cpufreq: Improve kerneldoc comments for cpufreq_cpu_get/put()
Fix the formatting of the cpufreq_cpu_get() and cpufreq_cpu_put()
kerneldoc comments and rework them to be somewhat easier to follow.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| -rw-r--r-- | drivers/cpufreq/cpufreq.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 0e626b00053b..e10922709d13 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
| @@ -206,17 +206,15 @@ unsigned int cpufreq_generic_get(unsigned int cpu) | |||
| 206 | EXPORT_SYMBOL_GPL(cpufreq_generic_get); | 206 | EXPORT_SYMBOL_GPL(cpufreq_generic_get); |
| 207 | 207 | ||
| 208 | /** | 208 | /** |
| 209 | * cpufreq_cpu_get: returns policy for a cpu and marks it busy. | 209 | * cpufreq_cpu_get - Return policy for a CPU and mark it as busy. |
| 210 | * @cpu: CPU to find the policy for. | ||
| 210 | * | 211 | * |
| 211 | * @cpu: cpu to find policy for. | 212 | * Call cpufreq_cpu_get_raw() to obtain a cpufreq policy for @cpu and increment |
| 213 | * the kobject reference counter of that policy. Return a valid policy on | ||
| 214 | * success or NULL on failure. | ||
| 212 | * | 215 | * |
| 213 | * This returns policy for 'cpu', returns NULL if it doesn't exist. | 216 | * The policy returned by this function has to be released with the help of |
| 214 | * It also increments the kobject reference count to mark it busy and so would | 217 | * cpufreq_cpu_put() to balance its kobject reference counter properly. |
| 215 | * require a corresponding call to cpufreq_cpu_put() to decrement it back. | ||
| 216 | * If corresponding call cpufreq_cpu_put() isn't made, the policy wouldn't be | ||
| 217 | * freed as that depends on the kobj count. | ||
| 218 | * | ||
| 219 | * Return: A valid policy on success, otherwise NULL on failure. | ||
| 220 | */ | 218 | */ |
| 221 | struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu) | 219 | struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu) |
| 222 | { | 220 | { |
| @@ -243,12 +241,8 @@ struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu) | |||
| 243 | EXPORT_SYMBOL_GPL(cpufreq_cpu_get); | 241 | EXPORT_SYMBOL_GPL(cpufreq_cpu_get); |
| 244 | 242 | ||
| 245 | /** | 243 | /** |
| 246 | * cpufreq_cpu_put: Decrements the usage count of a policy | 244 | * cpufreq_cpu_put - Decrement kobject usage counter for cpufreq policy. |
| 247 | * | 245 | * @policy: cpufreq policy returned by cpufreq_cpu_get(). |
| 248 | * @policy: policy earlier returned by cpufreq_cpu_get(). | ||
| 249 | * | ||
| 250 | * This decrements the kobject reference count incremented earlier by calling | ||
| 251 | * cpufreq_cpu_get(). | ||
| 252 | */ | 246 | */ |
| 253 | void cpufreq_cpu_put(struct cpufreq_policy *policy) | 247 | void cpufreq_cpu_put(struct cpufreq_policy *policy) |
| 254 | { | 248 | { |
