@@ -317,8 +317,10 @@ int cpuidle_enable_device(struct cpuidle_device *dev)
return 0;
if (!drv || !cpuidle_curr_governor)
return -EIO;
- if (!dev->state_count)
+ if (!dev->state_count) {
dev->state_count = drv->state_count;
+ dev->states = drv->states;
+ }
if (dev->registered == 0) {
ret = __cpuidle_register_device(dev);
@@ -96,6 +96,7 @@ struct cpuidle_device {
int last_residency;
int state_count;
+ struct cpuidle_state *states;
struct cpuidle_state_usage states_usage[CPUIDLE_STATE_MAX];
struct cpuidle_state_kobj *kobjs[CPUIDLE_STATE_MAX];