diff options
Diffstat (limited to 'drivers/cpufreq/cpufreq_conservative.c')
-rw-r--r-- | drivers/cpufreq/cpufreq_conservative.c | 48 |
1 files changed, 16 insertions, 32 deletions
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c index 599a40b25cb0..ce5248e04218 100644 --- a/drivers/cpufreq/cpufreq_conservative.c +++ b/drivers/cpufreq/cpufreq_conservative.c | |||
@@ -178,12 +178,8 @@ static ssize_t show_sampling_rate_min(struct kobject *kobj, | |||
178 | return sprintf(buf, "%u\n", min_sampling_rate); | 178 | return sprintf(buf, "%u\n", min_sampling_rate); |
179 | } | 179 | } |
180 | 180 | ||
181 | #define define_one_ro(_name) \ | 181 | define_one_global_ro(sampling_rate_max); |
182 | static struct global_attr _name = \ | 182 | define_one_global_ro(sampling_rate_min); |
183 | __ATTR(_name, 0444, show_##_name, NULL) | ||
184 | |||
185 | define_one_ro(sampling_rate_max); | ||
186 | define_one_ro(sampling_rate_min); | ||
187 | 183 | ||
188 | /* cpufreq_conservative Governor Tunables */ | 184 | /* cpufreq_conservative Governor Tunables */ |
189 | #define show_one(file_name, object) \ | 185 | #define show_one(file_name, object) \ |
@@ -221,12 +217,8 @@ show_one_old(freq_step); | |||
221 | show_one_old(sampling_rate_min); | 217 | show_one_old(sampling_rate_min); |
222 | show_one_old(sampling_rate_max); | 218 | show_one_old(sampling_rate_max); |
223 | 219 | ||
224 | #define define_one_ro_old(object, _name) \ | 220 | cpufreq_freq_attr_ro_old(sampling_rate_min); |
225 | static struct freq_attr object = \ | 221 | cpufreq_freq_attr_ro_old(sampling_rate_max); |
226 | __ATTR(_name, 0444, show_##_name##_old, NULL) | ||
227 | |||
228 | define_one_ro_old(sampling_rate_min_old, sampling_rate_min); | ||
229 | define_one_ro_old(sampling_rate_max_old, sampling_rate_max); | ||
230 | 222 | ||
231 | /*** delete after deprecation time ***/ | 223 | /*** delete after deprecation time ***/ |
232 | 224 | ||
@@ -364,16 +356,12 @@ static ssize_t store_freq_step(struct kobject *a, struct attribute *b, | |||
364 | return count; | 356 | return count; |
365 | } | 357 | } |
366 | 358 | ||
367 | #define define_one_rw(_name) \ | 359 | define_one_global_rw(sampling_rate); |
368 | static struct global_attr _name = \ | 360 | define_one_global_rw(sampling_down_factor); |
369 | __ATTR(_name, 0644, show_##_name, store_##_name) | 361 | define_one_global_rw(up_threshold); |
370 | 362 | define_one_global_rw(down_threshold); | |
371 | define_one_rw(sampling_rate); | 363 | define_one_global_rw(ignore_nice_load); |
372 | define_one_rw(sampling_down_factor); | 364 | define_one_global_rw(freq_step); |
373 | define_one_rw(up_threshold); | ||
374 | define_one_rw(down_threshold); | ||
375 | define_one_rw(ignore_nice_load); | ||
376 | define_one_rw(freq_step); | ||
377 | 365 | ||
378 | static struct attribute *dbs_attributes[] = { | 366 | static struct attribute *dbs_attributes[] = { |
379 | &sampling_rate_max.attr, | 367 | &sampling_rate_max.attr, |
@@ -409,16 +397,12 @@ write_one_old(down_threshold); | |||
409 | write_one_old(ignore_nice_load); | 397 | write_one_old(ignore_nice_load); |
410 | write_one_old(freq_step); | 398 | write_one_old(freq_step); |
411 | 399 | ||
412 | #define define_one_rw_old(object, _name) \ | 400 | cpufreq_freq_attr_rw_old(sampling_rate); |
413 | static struct freq_attr object = \ | 401 | cpufreq_freq_attr_rw_old(sampling_down_factor); |
414 | __ATTR(_name, 0644, show_##_name##_old, store_##_name##_old) | 402 | cpufreq_freq_attr_rw_old(up_threshold); |
415 | 403 | cpufreq_freq_attr_rw_old(down_threshold); | |
416 | define_one_rw_old(sampling_rate_old, sampling_rate); | 404 | cpufreq_freq_attr_rw_old(ignore_nice_load); |
417 | define_one_rw_old(sampling_down_factor_old, sampling_down_factor); | 405 | cpufreq_freq_attr_rw_old(freq_step); |
418 | define_one_rw_old(up_threshold_old, up_threshold); | ||
419 | define_one_rw_old(down_threshold_old, down_threshold); | ||
420 | define_one_rw_old(ignore_nice_load_old, ignore_nice_load); | ||
421 | define_one_rw_old(freq_step_old, freq_step); | ||
422 | 406 | ||
423 | static struct attribute *dbs_attributes_old[] = { | 407 | static struct attribute *dbs_attributes_old[] = { |
424 | &sampling_rate_max_old.attr, | 408 | &sampling_rate_max_old.attr, |