aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq_stats.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2013-02-04 06:38:52 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-02-08 19:18:40 -0500
commitdf18e504aa5db8e7263c91e153c27c6f895da3c7 (patch)
treea353c279235c93cee9590225f1a433f4014ddcce /drivers/cpufreq/cpufreq_stats.c
parent3361b7b173341fdaa85153e1b322099949c9f8c8 (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.c18
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
25static spinlock_t cpufreq_stats_lock; 25static spinlock_t cpufreq_stats_lock;
26 26
27#define CPUFREQ_STATDEVICE_ATTR(_name, _mode, _show) \
28static struct freq_attr _attr_##_name = {\
29 .attr = {.name = __stringify(_name), .mode = _mode, }, \
30 .show = _show,\
31};
32
33struct cpufreq_stats { 27struct 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}
139CPUFREQ_STATDEVICE_ATTR(trans_table, 0444, show_trans_table); 133cpufreq_freq_attr_ro(trans_table);
140#endif 134#endif
141 135
142CPUFREQ_STATDEVICE_ATTR(total_trans, 0444, show_total_trans); 136cpufreq_freq_attr_ro(total_trans);
143CPUFREQ_STATDEVICE_ATTR(time_in_state, 0444, show_time_in_state); 137cpufreq_freq_attr_ro(time_in_state);
144 138
145static struct attribute *default_attrs[] = { 139static 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};