aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cpufreq.h
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2010-10-27 18:15:57 -0400
committerMichal Marek <mmarek@suse.cz>2010-10-27 18:15:57 -0400
commitb74b953b998bcc2db91b694446f3a2619ec32de6 (patch)
tree6ce24caabd730f6ae9287ed0676ec32e6ff31e9d /include/linux/cpufreq.h
parentabb438526201c6a79949ad45375c051b6681c253 (diff)
parentf6f94e2ab1b33f0082ac22d71f66385a60d8157f (diff)
Merge commit 'v2.6.36' into kbuild/misc
Update to be able to fix a recent change to scripts/basic/docproc.c (commit eda603f).
Diffstat (limited to 'include/linux/cpufreq.h')
-rw-r--r--include/linux/cpufreq.h35
1 files changed, 30 insertions, 5 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 4de02b10007f..c3e9de8321c6 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -196,11 +196,6 @@ extern int __cpufreq_driver_getavg(struct cpufreq_policy *policy,
196int cpufreq_register_governor(struct cpufreq_governor *governor); 196int cpufreq_register_governor(struct cpufreq_governor *governor);
197void cpufreq_unregister_governor(struct cpufreq_governor *governor); 197void cpufreq_unregister_governor(struct cpufreq_governor *governor);
198 198
199int lock_policy_rwsem_read(int cpu);
200int lock_policy_rwsem_write(int cpu);
201void unlock_policy_rwsem_read(int cpu);
202void unlock_policy_rwsem_write(int cpu);
203
204 199
205/********************************************************************* 200/*********************************************************************
206 * CPUFREQ DRIVER INTERFACE * 201 * CPUFREQ DRIVER INTERFACE *
@@ -278,6 +273,27 @@ struct freq_attr {
278 ssize_t (*store)(struct cpufreq_policy *, const char *, size_t count); 273 ssize_t (*store)(struct cpufreq_policy *, const char *, size_t count);
279}; 274};
280 275
276#define cpufreq_freq_attr_ro(_name) \
277static struct freq_attr _name = \
278__ATTR(_name, 0444, show_##_name, NULL)
279
280#define cpufreq_freq_attr_ro_perm(_name, _perm) \
281static struct freq_attr _name = \
282__ATTR(_name, _perm, show_##_name, NULL)
283
284#define cpufreq_freq_attr_ro_old(_name) \
285static struct freq_attr _name##_old = \
286__ATTR(_name, 0444, show_##_name##_old, NULL)
287
288#define cpufreq_freq_attr_rw(_name) \
289static struct freq_attr _name = \
290__ATTR(_name, 0644, show_##_name, store_##_name)
291
292#define cpufreq_freq_attr_rw_old(_name) \
293static struct freq_attr _name##_old = \
294__ATTR(_name, 0644, show_##_name##_old, store_##_name##_old)
295
296
281struct global_attr { 297struct global_attr {
282 struct attribute attr; 298 struct attribute attr;
283 ssize_t (*show)(struct kobject *kobj, 299 ssize_t (*show)(struct kobject *kobj,
@@ -286,6 +302,15 @@ struct global_attr {
286 const char *c, size_t count); 302 const char *c, size_t count);
287}; 303};
288 304
305#define define_one_global_ro(_name) \
306static struct global_attr _name = \
307__ATTR(_name, 0444, show_##_name, NULL)
308
309#define define_one_global_rw(_name) \
310static struct global_attr _name = \
311__ATTR(_name, 0644, show_##_name, store_##_name)
312
313
289/********************************************************************* 314/*********************************************************************
290 * CPUFREQ 2.6. INTERFACE * 315 * CPUFREQ 2.6. INTERFACE *
291 *********************************************************************/ 316 *********************************************************************/