mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 10:33:27 +00:00
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: Thomas Renninger <trenn@suse.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
This commit is contained in:
parent
2dfc818b35
commit
88f984e0e2
1 changed files with 1 additions and 1 deletions
|
@ -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++) {
|
||||
|
|
Loading…
Reference in a new issue