mirror of
https://github.com/ARM-software/devlib.git
synced 2025-02-07 13:40:48 +00:00
module/cpuidle: ensure get_states() returns a list
Ensure that cpuidle.get_states() always returns a list, even if no idle states are available on the target.
This commit is contained in:
parent
329df6f42e
commit
d6ccbb44c3
@ -132,7 +132,7 @@ class Cpuidle(Module):
|
||||
def get_states(self, cpu=0):
|
||||
if isinstance(cpu, int):
|
||||
cpu = 'cpu{}'.format(cpu)
|
||||
return self._states.get(cpu)
|
||||
return self._states.get(cpu, [])
|
||||
|
||||
def get_state(self, state, cpu=0):
|
||||
if isinstance(state, int):
|
||||
|
Loading…
x
Reference in New Issue
Block a user