power: refactor ACPI and intel_pstate support
authorAnatoly Burakov <anatoly.burakov@intel.com>
Thu, 8 Jul 2021 15:38:23 +0000 (16:38 +0100)
committerDavid Marchand <david.marchand@redhat.com>
Thu, 8 Jul 2021 20:32:13 +0000 (22:32 +0200)
commit06cffd468fdd2b96bbc3c0f8b1269275e10c2a6e
treec4aa1904a4eab7bdcf712ed2f737f67aa52257b5
parent02a6d683113428f87e2375ba249b9c40ae46ff79
power: refactor ACPI and intel_pstate support

Currently, ACPI and PSTATE modes have lots of code duplication,
confusing logic, and a bunch of other issues that can, and have, led to
various bugs and resource leaks.

This commit factors out the common parts of sysfs reading/writing for
ACPI and PSTATE drivers.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
lib/power/power_acpi_cpufreq.c
lib/power/power_common.c
lib/power/power_common.h
lib/power/power_pstate_cpufreq.c