mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
PM / devfreq: Do not show statistics if it's not ready.
Before this patch for a device without statistics support, $ cat trans_stat From : To : time(ms) Total transitions : 0 $ After this patch applied for such a device, $ cat trans_stat Not Supported. $ Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
This commit is contained in:
parent
d7df1e4647
commit
34bd322070
1 changed files with 2 additions and 0 deletions
|
@ -1049,6 +1049,8 @@ static ssize_t trans_stat_show(struct device *dev,
|
|||
if (!devfreq->stop_polling &&
|
||||
devfreq_update_status(devfreq, devfreq->previous_freq))
|
||||
return 0;
|
||||
if (max_state == 0)
|
||||
return sprintf(buf, "Not Supported.\n");
|
||||
|
||||
len = sprintf(buf, " From : To\n");
|
||||
len += sprintf(buf + len, " :");
|
||||
|
|
Loading…
Reference in a new issue