diff options
Diffstat (limited to 'drivers/cpufreq/cpufreq_ondemand.c')
-rw-r--r-- | drivers/cpufreq/cpufreq_ondemand.c | 40 |
1 files changed, 12 insertions, 28 deletions
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c index bd444dc93cf2..c00b25f4d243 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c | |||
@@ -234,12 +234,8 @@ static ssize_t show_sampling_rate_min(struct kobject *kobj, | |||
234 | return sprintf(buf, "%u\n", min_sampling_rate); | 234 | return sprintf(buf, "%u\n", min_sampling_rate); |
235 | } | 235 | } |
236 | 236 | ||
237 | #define define_one_ro(_name) \ | 237 | define_one_global_ro(sampling_rate_max); |
238 | static struct global_attr _name = \ | 238 | define_one_global_ro(sampling_rate_min); |
239 | __ATTR(_name, 0444, show_##_name, NULL) | ||
240 | |||
241 | define_one_ro(sampling_rate_max); | ||
242 | define_one_ro(sampling_rate_min); | ||
243 | 239 | ||
244 | /* cpufreq_ondemand Governor Tunables */ | 240 | /* cpufreq_ondemand Governor Tunables */ |
245 | #define show_one(file_name, object) \ | 241 | #define show_one(file_name, object) \ |
@@ -274,12 +270,8 @@ show_one_old(powersave_bias); | |||
274 | show_one_old(sampling_rate_min); | 270 | show_one_old(sampling_rate_min); |
275 | show_one_old(sampling_rate_max); | 271 | show_one_old(sampling_rate_max); |
276 | 272 | ||
277 | #define define_one_ro_old(object, _name) \ | 273 | cpufreq_freq_attr_ro_old(sampling_rate_min); |
278 | static struct freq_attr object = \ | 274 | cpufreq_freq_attr_ro_old(sampling_rate_max); |
279 | __ATTR(_name, 0444, show_##_name##_old, NULL) | ||
280 | |||
281 | define_one_ro_old(sampling_rate_min_old, sampling_rate_min); | ||
282 | define_one_ro_old(sampling_rate_max_old, sampling_rate_max); | ||
283 | 275 | ||
284 | /*** delete after deprecation time ***/ | 276 | /*** delete after deprecation time ***/ |
285 | 277 | ||
@@ -376,14 +368,10 @@ static ssize_t store_powersave_bias(struct kobject *a, struct attribute *b, | |||
376 | return count; | 368 | return count; |
377 | } | 369 | } |
378 | 370 | ||
379 | #define define_one_rw(_name) \ | 371 | define_one_global_rw(sampling_rate); |
380 | static struct global_attr _name = \ | 372 | define_one_global_rw(up_threshold); |
381 | __ATTR(_name, 0644, show_##_name, store_##_name) | 373 | define_one_global_rw(ignore_nice_load); |
382 | 374 | define_one_global_rw(powersave_bias); | |
383 | define_one_rw(sampling_rate); | ||
384 | define_one_rw(up_threshold); | ||
385 | define_one_rw(ignore_nice_load); | ||
386 | define_one_rw(powersave_bias); | ||
387 | 375 | ||
388 | static struct attribute *dbs_attributes[] = { | 376 | static struct attribute *dbs_attributes[] = { |
389 | &sampling_rate_max.attr, | 377 | &sampling_rate_max.attr, |
@@ -415,14 +403,10 @@ write_one_old(up_threshold); | |||
415 | write_one_old(ignore_nice_load); | 403 | write_one_old(ignore_nice_load); |
416 | write_one_old(powersave_bias); | 404 | write_one_old(powersave_bias); |
417 | 405 | ||
418 | #define define_one_rw_old(object, _name) \ | 406 | cpufreq_freq_attr_rw_old(sampling_rate); |
419 | static struct freq_attr object = \ | 407 | cpufreq_freq_attr_rw_old(up_threshold); |
420 | __ATTR(_name, 0644, show_##_name##_old, store_##_name##_old) | 408 | cpufreq_freq_attr_rw_old(ignore_nice_load); |
421 | 409 | cpufreq_freq_attr_rw_old(powersave_bias); | |
422 | define_one_rw_old(sampling_rate_old, sampling_rate); | ||
423 | define_one_rw_old(up_threshold_old, up_threshold); | ||
424 | define_one_rw_old(ignore_nice_load_old, ignore_nice_load); | ||
425 | define_one_rw_old(powersave_bias_old, powersave_bias); | ||
426 | 410 | ||
427 | static struct attribute *dbs_attributes_old[] = { | 411 | static struct attribute *dbs_attributes_old[] = { |
428 | &sampling_rate_max_old.attr, | 412 | &sampling_rate_max_old.attr, |