]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cpuidle: ACPI: do not overwrite name and description of C0
authorThomas Schlichter <thomas.schlichter@web.de>
Tue, 31 Mar 2015 18:24:39 +0000 (20:24 +0200)
committerSasha Levin <sasha.levin@oracle.com>
Fri, 24 Apr 2015 21:13:57 +0000 (17:13 -0400)
commitae0f5de3bbd931e0046f505f39daff158d0faa75
tree6ddb4ed101e5c8729423742c799f86892a96e0f6
parent8711912370919b58fdb61d6b47cee1b30926b489
cpuidle: ACPI: do not overwrite name and description of C0

[ Upstream commit c7e8bdf5872c5a8f5a6494e16fe839c38a0d3d3d ]

Fix a bug that leads to showing the name and description of C-state C0
as "<null>" in sysfs after the ACPI C-states changed (e.g. after AC->DC
or DC->AC
transition).

The function poll_idle_init() in drivers/cpuidle/driver.c initializes the
state 0 during cpuidle_register_driver(), so we better do not overwrite it
again with '\0' during acpi_processor_cst_has_changed().

Signed-off-by: Thomas Schlichter <thomas.schlichter@web.de>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: 3.13+ <stable@vger.kernel.org> # 3.13+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/acpi/processor_idle.c