diff options
author | Rafael J. Wysocki | 2021-11-18 20:34:57 +0100 |
---|---|---|
committer | Rafael J. Wysocki | 2021-11-18 20:34:57 +0100 |
commit | 47b577ae6fba635de1e5e042d425ebd0f9313111 (patch) | |
tree | b736d952b1cc1bf8a0d41a75ee3631f37882b6bd | |
parent | 08374410a5ea3ff2fa9a87edd7d7ab15375b1c31 (diff) | |
parent | 4d1cd1443db3d5605ebcde8672869b1944ade92d (diff) |
Merge branch 'powercap'
Merge a Dynamic Thermal Power Management (DTPM) framework fix for
5.16-rc2.
* powercap:
powercap: DTPM: Fix suspend failure and kernel warning
-rw-r--r-- | drivers/powercap/dtpm_cpu.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/powercap/dtpm_cpu.c b/drivers/powercap/dtpm_cpu.c index 44faa3a74db6..b740866b228d 100644 --- a/drivers/powercap/dtpm_cpu.c +++ b/drivers/powercap/dtpm_cpu.c @@ -166,16 +166,13 @@ static struct dtpm_ops dtpm_ops = { static int cpuhp_dtpm_cpu_offline(unsigned int cpu) { - struct em_perf_domain *pd; struct dtpm_cpu *dtpm_cpu; - pd = em_cpu_get(cpu); - if (!pd) - return -EINVAL; - dtpm_cpu = per_cpu(dtpm_per_cpu, cpu); + if (dtpm_cpu) + dtpm_update_power(&dtpm_cpu->dtpm); - return dtpm_update_power(&dtpm_cpu->dtpm); + return 0; } static int cpuhp_dtpm_cpu_online(unsigned int cpu) |