diff options
author | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2015-03-31 20:15:09 +0200 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2015-04-24 17:13:56 -0400 |
commit | 8711912370919b58fdb61d6b47cee1b30926b489 (patch) | |
tree | fc779ad4de61e9a82c3e4d15d7d927f164c8a24c /include | |
parent | a32d3f403401705e40cacd8ca2a4eb7ff8d8fb69 (diff) | |
download | lwn-8711912370919b58fdb61d6b47cee1b30926b489.tar.gz lwn-8711912370919b58fdb61d6b47cee1b30926b489.zip |
cpuidle: remove state_count field from struct cpuidle_device
[ Upstream commit d75e4af14e228bbe3f86e29bcecb8e6be98d4e04 ]
Thomas Schlichter reports the following issue on his Samsung NC20:
"The C-states C1 and C2 to the OS when connected to AC, and additionally
provides the C3 C-state when disconnected from AC. However, the number
of C-states shown in sysfs is fixed to the number of C-states present
at boot.
If I boot with AC connected, I always only see the C-states up to C2
even if I disconnect AC.
The reason is commit 130a5f692425 (ACPI / cpuidle: remove dev->state_count
setting). It removes the update of dev->state_count, but sysfs uses
exactly this variable to show the C-states.
The fix is to use drv->state_count in sysfs. As this is currently the
last user of dev->state_count, this variable can be completely removed."
Remove dev->state_count as per the above.
Reported-by: Thomas Schlichter <thomas.schlichter@web.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: 3.14+ <stable@vger.kernel.org> # 3.14+
[ rjw: Changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/cpuidle.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 25e0df6155a4..575b7166cb08 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h @@ -69,7 +69,6 @@ struct cpuidle_device { unsigned int cpu; int last_residency; - int state_count; struct cpuidle_state_usage states_usage[CPUIDLE_STATE_MAX]; struct cpuidle_state_kobj *kobjs[CPUIDLE_STATE_MAX]; struct cpuidle_driver_kobj *kobj_driver; |