aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Farina <tfransosi@gmail.com>2011-04-28 19:42:53 -0400
committerDave Jones <davej@redhat.com>2011-05-04 11:50:57 -0400
commit335dc3335ff692173bc766b248f7a97f3a23b30a (patch)
tree0445cf17ecc94ae4cac7c02191d9bdad467cc37c
parent2d06d8c49afdcc9bb35a85039fa50f0fe35bd40e (diff)
[CPUFREQ] cpufreq.h: Fix some checkpatch.pl coding style issues.
Before: $ scripts/checkpatch.pl --file --terse include/linux/cpufreq.h total: 14 errors, 11 warnings, 419 lines checked After: $ scripts/checkpatch.pl --file --terse include/linux/cpufreq.h total: 2 errors, 4 warnings, 422 lines checked Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Dave Jones <davej@redhat.com>
-rw-r--r--include/linux/cpufreq.h33
1 files changed, 18 insertions, 15 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 2845f6e67221..11be48e0d168 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -3,7 +3,7 @@
3 * 3 *
4 * Copyright (C) 2001 Russell King 4 * Copyright (C) 2001 Russell King
5 * (C) 2002 - 2003 Dominik Brodowski <linux@brodo.de> 5 * (C) 2002 - 2003 Dominik Brodowski <linux@brodo.de>
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as 8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
@@ -56,9 +56,9 @@ static inline int cpufreq_unregister_notifier(struct notifier_block *nb,
56#define CPUFREQ_POLICY_POWERSAVE (1) 56#define CPUFREQ_POLICY_POWERSAVE (1)
57#define CPUFREQ_POLICY_PERFORMANCE (2) 57#define CPUFREQ_POLICY_PERFORMANCE (2)
58 58
59/* Frequency values here are CPU kHz so that hardware which doesn't run 59/* Frequency values here are CPU kHz so that hardware which doesn't run
60 * with some frequencies can complain without having to guess what per 60 * with some frequencies can complain without having to guess what per
61 * cent / per mille means. 61 * cent / per mille means.
62 * Maximum transition latency is in nanoseconds - if it's unknown, 62 * Maximum transition latency is in nanoseconds - if it's unknown,
63 * CPUFREQ_ETERNAL shall be used. 63 * CPUFREQ_ETERNAL shall be used.
64 */ 64 */
@@ -72,13 +72,15 @@ extern struct kobject *cpufreq_global_kobject;
72struct cpufreq_cpuinfo { 72struct cpufreq_cpuinfo {
73 unsigned int max_freq; 73 unsigned int max_freq;
74 unsigned int min_freq; 74 unsigned int min_freq;
75 unsigned int transition_latency; /* in 10^(-9) s = nanoseconds */ 75
76 /* in 10^(-9) s = nanoseconds */
77 unsigned int transition_latency;
76}; 78};
77 79
78struct cpufreq_real_policy { 80struct cpufreq_real_policy {
79 unsigned int min; /* in kHz */ 81 unsigned int min; /* in kHz */
80 unsigned int max; /* in kHz */ 82 unsigned int max; /* in kHz */
81 unsigned int policy; /* see above */ 83 unsigned int policy; /* see above */
82 struct cpufreq_governor *governor; /* see below */ 84 struct cpufreq_governor *governor; /* see below */
83}; 85};
84 86
@@ -94,7 +96,7 @@ struct cpufreq_policy {
94 unsigned int max; /* in kHz */ 96 unsigned int max; /* in kHz */
95 unsigned int cur; /* in kHz, only needed if cpufreq 97 unsigned int cur; /* in kHz, only needed if cpufreq
96 * governors are used */ 98 * governors are used */
97 unsigned int policy; /* see above */ 99 unsigned int policy; /* see above */
98 struct cpufreq_governor *governor; /* see below */ 100 struct cpufreq_governor *governor; /* see below */
99 101
100 struct work_struct update; /* if update_policy() needs to be 102 struct work_struct update; /* if update_policy() needs to be
@@ -167,11 +169,11 @@ static inline unsigned long cpufreq_scale(unsigned long old, u_int div, u_int mu
167 169
168struct cpufreq_governor { 170struct cpufreq_governor {
169 char name[CPUFREQ_NAME_LEN]; 171 char name[CPUFREQ_NAME_LEN];
170 int (*governor) (struct cpufreq_policy *policy, 172 int (*governor) (struct cpufreq_policy *policy,
171 unsigned int event); 173 unsigned int event);
172 ssize_t (*show_setspeed) (struct cpufreq_policy *policy, 174 ssize_t (*show_setspeed) (struct cpufreq_policy *policy,
173 char *buf); 175 char *buf);
174 int (*store_setspeed) (struct cpufreq_policy *policy, 176 int (*store_setspeed) (struct cpufreq_policy *policy,
175 unsigned int freq); 177 unsigned int freq);
176 unsigned int max_transition_latency; /* HW must be able to switch to 178 unsigned int max_transition_latency; /* HW must be able to switch to
177 next freq faster than this value in nano secs or we 179 next freq faster than this value in nano secs or we
@@ -180,7 +182,8 @@ struct cpufreq_governor {
180 struct module *owner; 182 struct module *owner;
181}; 183};
182 184
183/* pass a target to the cpufreq driver 185/*
186 * Pass a target to the cpufreq driver.
184 */ 187 */
185extern int cpufreq_driver_target(struct cpufreq_policy *policy, 188extern int cpufreq_driver_target(struct cpufreq_policy *policy,
186 unsigned int target_freq, 189 unsigned int target_freq,
@@ -237,9 +240,9 @@ struct cpufreq_driver {
237 240
238/* flags */ 241/* flags */
239 242
240#define CPUFREQ_STICKY 0x01 /* the driver isn't removed even if 243#define CPUFREQ_STICKY 0x01 /* the driver isn't removed even if
241 * all ->init() calls failed */ 244 * all ->init() calls failed */
242#define CPUFREQ_CONST_LOOPS 0x02 /* loops_per_jiffy or other kernel 245#define CPUFREQ_CONST_LOOPS 0x02 /* loops_per_jiffy or other kernel
243 * "constants" aren't affected by 246 * "constants" aren't affected by
244 * frequency transitions */ 247 * frequency transitions */
245#define CPUFREQ_PM_NO_WARN 0x04 /* don't warn on suspend/resume speed 248#define CPUFREQ_PM_NO_WARN 0x04 /* don't warn on suspend/resume speed
@@ -252,7 +255,7 @@ int cpufreq_unregister_driver(struct cpufreq_driver *driver_data);
252void cpufreq_notify_transition(struct cpufreq_freqs *freqs, unsigned int state); 255void cpufreq_notify_transition(struct cpufreq_freqs *freqs, unsigned int state);
253 256
254 257
255static inline void cpufreq_verify_within_limits(struct cpufreq_policy *policy, unsigned int min, unsigned int max) 258static inline void cpufreq_verify_within_limits(struct cpufreq_policy *policy, unsigned int min, unsigned int max)
256{ 259{
257 if (policy->min < min) 260 if (policy->min < min)
258 policy->min = min; 261 policy->min = min;
@@ -386,12 +389,12 @@ int cpufreq_frequency_table_target(struct cpufreq_policy *policy,
386/* the following 3 funtions are for cpufreq core use only */ 389/* the following 3 funtions are for cpufreq core use only */
387struct cpufreq_frequency_table *cpufreq_frequency_get_table(unsigned int cpu); 390struct cpufreq_frequency_table *cpufreq_frequency_get_table(unsigned int cpu);
388struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu); 391struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu);
389void cpufreq_cpu_put (struct cpufreq_policy *data); 392void cpufreq_cpu_put(struct cpufreq_policy *data);
390 393
391/* the following are really really optional */ 394/* the following are really really optional */
392extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs; 395extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs;
393 396
394void cpufreq_frequency_table_get_attr(struct cpufreq_frequency_table *table, 397void cpufreq_frequency_table_get_attr(struct cpufreq_frequency_table *table,
395 unsigned int cpu); 398 unsigned int cpu);
396 399
397void cpufreq_frequency_table_put_attr(unsigned int cpu); 400void cpufreq_frequency_table_put_attr(unsigned int cpu);