diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/cpufreq.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 4de02b10007f..9f15150ce8d6 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -278,6 +278,27 @@ struct freq_attr { | |||
278 | ssize_t (*store)(struct cpufreq_policy *, const char *, size_t count); | 278 | ssize_t (*store)(struct cpufreq_policy *, const char *, size_t count); |
279 | }; | 279 | }; |
280 | 280 | ||
281 | #define cpufreq_freq_attr_ro(_name) \ | ||
282 | static struct freq_attr _name = \ | ||
283 | __ATTR(_name, 0444, show_##_name, NULL) | ||
284 | |||
285 | #define cpufreq_freq_attr_ro_perm(_name, _perm) \ | ||
286 | static struct freq_attr _name = \ | ||
287 | __ATTR(_name, _perm, show_##_name, NULL) | ||
288 | |||
289 | #define cpufreq_freq_attr_ro_old(_name) \ | ||
290 | static struct freq_attr _name##_old = \ | ||
291 | __ATTR(_name, 0444, show_##_name##_old, NULL) | ||
292 | |||
293 | #define cpufreq_freq_attr_rw(_name) \ | ||
294 | static struct freq_attr _name = \ | ||
295 | __ATTR(_name, 0644, show_##_name, store_##_name) | ||
296 | |||
297 | #define cpufreq_freq_attr_rw_old(_name) \ | ||
298 | static struct freq_attr _name##_old = \ | ||
299 | __ATTR(_name, 0644, show_##_name##_old, store_##_name##_old) | ||
300 | |||
301 | |||
281 | struct global_attr { | 302 | struct global_attr { |
282 | struct attribute attr; | 303 | struct attribute attr; |
283 | ssize_t (*show)(struct kobject *kobj, | 304 | ssize_t (*show)(struct kobject *kobj, |
@@ -286,6 +307,15 @@ struct global_attr { | |||
286 | const char *c, size_t count); | 307 | const char *c, size_t count); |
287 | }; | 308 | }; |
288 | 309 | ||
310 | #define define_one_global_ro(_name) \ | ||
311 | static struct global_attr _name = \ | ||
312 | __ATTR(_name, 0444, show_##_name, NULL) | ||
313 | |||
314 | #define define_one_global_rw(_name) \ | ||
315 | static struct global_attr _name = \ | ||
316 | __ATTR(_name, 0644, show_##_name, store_##_name) | ||
317 | |||
318 | |||
289 | /********************************************************************* | 319 | /********************************************************************* |
290 | * CPUFREQ 2.6. INTERFACE * | 320 | * CPUFREQ 2.6. INTERFACE * |
291 | *********************************************************************/ | 321 | *********************************************************************/ |