Commit 49ac7dc6 authored by Dave Jones's avatar Dave Jones

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

Fixes the lack of MODULE_OWNER setting [can't cause problems yet
because cpufreq can only be built into the kernel], and allows
for code reduction.
Signed-off-by: default avatarDominik Brodowski <linux@brodo.de>
Signed-off-by: default avatarDave Jones <davej@redhat.com>
parent c93e0b07
......@@ -474,23 +474,16 @@ static ssize_t show_affected_cpus (struct cpufreq_policy * policy, char *buf)
#define define_one_ro(_name) \
static struct freq_attr _name = { \
.attr = { .name = __stringify(_name), .mode = 0444 }, \
.show = show_##_name, \
}
static struct freq_attr _name = \
__ATTR(_name, 0444, show_##_name, NULL)
#define define_one_ro0400(_name) \
static struct freq_attr _name = { \
.attr = { .name = __stringify(_name), .mode = 0400 }, \
.show = show_##_name, \
}
static struct freq_attr _name = \
__ATTR(_name, 0400, show_##_name, NULL)
#define define_one_rw(_name) \
static struct freq_attr _name = { \
.attr = { .name = __stringify(_name), .mode = 0644 }, \
.show = show_##_name, \
.store = store_##_name, \
}
static struct freq_attr _name = \
__ATTR(_name, 0644, show_##_name, store_##_name)
define_one_ro0400(cpuinfo_cur_freq);
define_one_ro(cpuinfo_min_freq);
......
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