提交 34bd3220 编写于 作者: M MyungJoo Ham

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: NMyungJoo Ham <myungjoo.ham@samsung.com>
上级 d7df1e46
......@@ -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, " :");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册