Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351043
b: refs/heads/master
c: df18e50
h: refs/heads/master
i:
  351041: d851a13
  351039: bebd8c2
v: v3
  • Loading branch information
Viresh Kumar authored and Rafael J. Wysocki committed Feb 9, 2013
1 parent 99dd2dd commit ea2a7b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3361b7b173341fdaa85153e1b322099949c9f8c8
refs/heads/master: df18e504aa5db8e7263c91e153c27c6f895da3c7
18 changes: 6 additions & 12 deletions trunk/drivers/cpufreq/cpufreq_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@

static spinlock_t cpufreq_stats_lock;

#define CPUFREQ_STATDEVICE_ATTR(_name, _mode, _show) \
static struct freq_attr _attr_##_name = {\
.attr = {.name = __stringify(_name), .mode = _mode, }, \
.show = _show,\
};

struct cpufreq_stats {
unsigned int cpu;
unsigned int total_trans;
Expand Down Expand Up @@ -136,17 +130,17 @@ static ssize_t show_trans_table(struct cpufreq_policy *policy, char *buf)
return PAGE_SIZE;
return len;
}
CPUFREQ_STATDEVICE_ATTR(trans_table, 0444, show_trans_table);
cpufreq_freq_attr_ro(trans_table);
#endif

CPUFREQ_STATDEVICE_ATTR(total_trans, 0444, show_total_trans);
CPUFREQ_STATDEVICE_ATTR(time_in_state, 0444, show_time_in_state);
cpufreq_freq_attr_ro(total_trans);
cpufreq_freq_attr_ro(time_in_state);

static struct attribute *default_attrs[] = {
&_attr_total_trans.attr,
&_attr_time_in_state.attr,
&total_trans.attr,
&time_in_state.attr,
#ifdef CONFIG_CPU_FREQ_STAT_DETAILS
&_attr_trans_table.attr,
&trans_table.attr,
#endif
NULL
};
Expand Down

0 comments on commit ea2a7b6

Please sign in to comment.