提交 88f984e0 编写于 作者: T Thomas Renninger 提交者: Dominik Brodowski

cpupower: Do not show an empty Idle_Stats monitor if no idle driver is available

By taking error values of:
sysfs_get_idlestate_count(..);
into account.
Signed-off-by: NThomas Renninger <trenn@suse.de>
Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
上级 2dfc818b
......@@ -134,7 +134,7 @@ static struct cpuidle_monitor *cpuidle_register(void)
/* Assume idle state count is the same for all CPUs */
cpuidle_sysfs_monitor.hw_states_num = sysfs_get_idlestate_count(0);
if (cpuidle_sysfs_monitor.hw_states_num == 0)
if (cpuidle_sysfs_monitor.hw_states_num <= 0)
return NULL;
for (num = 0; num < cpuidle_sysfs_monitor.hw_states_num; num++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册