Commit 0db291e7 authored by Dave Jones's avatar Dave Jones

[CPUFREQ] Use __ATTR in cpufreq_ondemand.c attribute definitions.

Fixes the lack of MODULE_OWNER setting, and allows for code recuction.
Signed-off-by: default avatarDominik Brodowski <linux@brodo.de>
Signed-off-by: default avatarDave Jones <davej@redhat.com>
parent 6496f339
...@@ -101,10 +101,8 @@ static ssize_t show_sampling_rate_min(struct cpufreq_policy *policy, char *buf) ...@@ -101,10 +101,8 @@ static ssize_t show_sampling_rate_min(struct cpufreq_policy *policy, char *buf)
} }
#define define_one_ro(_name) \ #define define_one_ro(_name) \
static struct freq_attr _name = { \ static struct freq_attr _name = \
.attr = { .name = __stringify(_name), .mode = 0444 }, \ __ATTR(_name, 0444, show_##_name, NULL)
.show = show_##_name, \
}
define_one_ro(sampling_rate_max); define_one_ro(sampling_rate_max);
define_one_ro(sampling_rate_min); define_one_ro(sampling_rate_min);
...@@ -190,11 +188,8 @@ static ssize_t store_down_threshold(struct cpufreq_policy *unused, ...@@ -190,11 +188,8 @@ static ssize_t store_down_threshold(struct cpufreq_policy *unused,
} }
#define define_one_rw(_name) \ #define define_one_rw(_name) \
static struct freq_attr _name = { \ static struct freq_attr _name = \
.attr = { .name = __stringify(_name), .mode = 0644 }, \ __ATTR(_name, 0644, show_##_name, store_##_name)
.show = show_##_name, \
.store = store_##_name, \
}
define_one_rw(sampling_rate); define_one_rw(sampling_rate);
define_one_rw(sampling_down_factor); define_one_rw(sampling_down_factor);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment