aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpuidle/sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpuidle/sysfs.c')
-rw-r--r--drivers/cpuidle/sysfs.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c
index 69102ca05685..e949618b9be0 100644
--- a/drivers/cpuidle/sysfs.c
+++ b/drivers/cpuidle/sysfs.c
@@ -218,6 +218,12 @@ static ssize_t show_state_##_name(struct cpuidle_state *state, char *buf) \
218 return sprintf(buf, "%u\n", state->_name);\ 218 return sprintf(buf, "%u\n", state->_name);\
219} 219}
220 220
221#define define_show_state_ull_function(_name) \
222static ssize_t show_state_##_name(struct cpuidle_state *state, char *buf) \
223{ \
224 return sprintf(buf, "%llu\n", state->_name);\
225}
226
221#define define_show_state_str_function(_name) \ 227#define define_show_state_str_function(_name) \
222static ssize_t show_state_##_name(struct cpuidle_state *state, char *buf) \ 228static ssize_t show_state_##_name(struct cpuidle_state *state, char *buf) \
223{ \ 229{ \
@@ -228,8 +234,8 @@ static ssize_t show_state_##_name(struct cpuidle_state *state, char *buf) \
228 234
229define_show_state_function(exit_latency) 235define_show_state_function(exit_latency)
230define_show_state_function(power_usage) 236define_show_state_function(power_usage)
231define_show_state_function(usage) 237define_show_state_ull_function(usage)
232define_show_state_function(time) 238define_show_state_ull_function(time)
233define_show_state_str_function(name) 239define_show_state_str_function(name)
234define_show_state_str_function(desc) 240define_show_state_str_function(desc)
235 241