diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2019-02-01 11:45:44 +0530 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-02-01 11:52:11 +0100 |
commit | 10b818211d04805da731087e596fc7c6ce199dea (patch) | |
tree | 3b61c217282cf3ced3c02ed3627a624ef713b4c1 /drivers/cpufreq | |
parent | cb772b8ce4b9f5353c34f4d38ab0c697c0071625 (diff) | |
download | linux-stable-10b818211d04805da731087e596fc7c6ce199dea.tar.gz linux-stable-10b818211d04805da731087e596fc7c6ce199dea.tar.bz2 linux-stable-10b818211d04805da731087e596fc7c6ce199dea.zip |
cpufreq: stats: Declare freq-attr right after their callbacks
Freq attribute for "trans_table" is defined right after its callback
(without any blank line between them), but the others are defined
separately later on. Keep this consistent and define all attributes
right after their callbacks.
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')
-rw-r--r-- | drivers/cpufreq/cpufreq_stats.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index 1572129844a5..941e63e3e652 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c @@ -51,6 +51,7 @@ static ssize_t show_total_trans(struct cpufreq_policy *policy, char *buf) { return sprintf(buf, "%d\n", policy->stats->total_trans); } +cpufreq_freq_attr_ro(total_trans); static ssize_t show_time_in_state(struct cpufreq_policy *policy, char *buf) { @@ -69,6 +70,7 @@ static ssize_t show_time_in_state(struct cpufreq_policy *policy, char *buf) } return len; } +cpufreq_freq_attr_ro(time_in_state); static ssize_t store_reset(struct cpufreq_policy *policy, const char *buf, size_t count) @@ -77,6 +79,7 @@ static ssize_t store_reset(struct cpufreq_policy *policy, const char *buf, cpufreq_stats_clear_table(policy->stats); return count; } +cpufreq_freq_attr_wo(reset); static ssize_t show_trans_table(struct cpufreq_policy *policy, char *buf) { @@ -126,10 +129,6 @@ static ssize_t show_trans_table(struct cpufreq_policy *policy, char *buf) } cpufreq_freq_attr_ro(trans_table); -cpufreq_freq_attr_ro(total_trans); -cpufreq_freq_attr_ro(time_in_state); -cpufreq_freq_attr_wo(reset); - static struct attribute *default_attrs[] = { &total_trans.attr, &time_in_state.attr, |