diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2013-02-04 06:38:52 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-02-08 19:18:40 -0500 |
commit | df18e504aa5db8e7263c91e153c27c6f895da3c7 (patch) | |
tree | a353c279235c93cee9590225f1a433f4014ddcce /drivers/cpufreq/cpufreq_stats.c | |
parent | 3361b7b173341fdaa85153e1b322099949c9f8c8 (diff) |
cpufreq / stats: Get rid of CPUFREQ_STATDEVICE_ATTR
Macro "CPUFREQ_STATDEVICE_ATTR" is defined local to cpufreq_stats.c file and is
almost a copy of the generic version present in cpufreq.h file. Lets use the
generic version instead.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/cpufreq_stats.c')
-rw-r--r-- | drivers/cpufreq/cpufreq_stats.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index 572124c6e36b..a2dee4cedf41 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c | |||
@@ -24,12 +24,6 @@ | |||
24 | 24 | ||
25 | static spinlock_t cpufreq_stats_lock; | 25 | static spinlock_t cpufreq_stats_lock; |
26 | 26 | ||
27 | #define CPUFREQ_STATDEVICE_ATTR(_name, _mode, _show) \ | ||
28 | static struct freq_attr _attr_##_name = {\ | ||
29 | .attr = {.name = __stringify(_name), .mode = _mode, }, \ | ||
30 | .show = _show,\ | ||
31 | }; | ||
32 | |||
33 | struct cpufreq_stats { | 27 | struct cpufreq_stats { |
34 | unsigned int cpu; | 28 | unsigned int cpu; |
35 | unsigned int total_trans; | 29 | unsigned int total_trans; |
@@ -136,17 +130,17 @@ static ssize_t show_trans_table(struct cpufreq_policy *policy, char *buf) | |||
136 | return PAGE_SIZE; | 130 | return PAGE_SIZE; |
137 | return len; | 131 | return len; |
138 | } | 132 | } |
139 | CPUFREQ_STATDEVICE_ATTR(trans_table, 0444, show_trans_table); | 133 | cpufreq_freq_attr_ro(trans_table); |
140 | #endif | 134 | #endif |
141 | 135 | ||
142 | CPUFREQ_STATDEVICE_ATTR(total_trans, 0444, show_total_trans); | 136 | cpufreq_freq_attr_ro(total_trans); |
143 | CPUFREQ_STATDEVICE_ATTR(time_in_state, 0444, show_time_in_state); | 137 | cpufreq_freq_attr_ro(time_in_state); |
144 | 138 | ||
145 | static struct attribute *default_attrs[] = { | 139 | static struct attribute *default_attrs[] = { |
146 | &_attr_total_trans.attr, | 140 | &total_trans.attr, |
147 | &_attr_time_in_state.attr, | 141 | &time_in_state.attr, |
148 | #ifdef CONFIG_CPU_FREQ_STAT_DETAILS | 142 | #ifdef CONFIG_CPU_FREQ_STAT_DETAILS |
149 | &_attr_trans_table.attr, | 143 | &trans_table.attr, |
150 | #endif | 144 | #endif |
151 | NULL | 145 | NULL |
152 | }; | 146 | }; |