projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4712a23
)
powercap/dtpm_cpu: Add exit function
author
Daniel Lezcano
<daniel.lezcano@linaro.org>
Sun, 30 Jan 2022 21:02:08 +0000
(22:02 +0100)
committer
Daniel Lezcano
<daniel.lezcano@linaro.org>
Wed, 23 Feb 2022 18:46:25 +0000
(19:46 +0100)
Now that we can destroy the hierarchy, the code must remove what it
had put in place at the creation. In our case, the cpu hotplug
callbacks.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Link:
https://lore.kernel.org/r/20220130210210.549877-6-daniel.lezcano@linaro.org
drivers/powercap/dtpm_cpu.c
patch
|
blob
|
history
diff --git
a/drivers/powercap/dtpm_cpu.c
b/drivers/powercap/dtpm_cpu.c
index 71f45d2f5a606f98605f1a686b4f42db30ab2db2..bca2f912d3496f3435552d6a1377562c31159c79 100644
(file)
--- a/
drivers/powercap/dtpm_cpu.c
+++ b/
drivers/powercap/dtpm_cpu.c
@@
-299,8
+299,15
@@
static int dtpm_cpu_init(void)
return 0;
}
+static void dtpm_cpu_exit(void)
+{
+ cpuhp_remove_state_nocalls(CPUHP_AP_ONLINE_DYN);
+ cpuhp_remove_state_nocalls(CPUHP_AP_DTPM_CPU_DEAD);
+}
+
struct dtpm_subsys_ops dtpm_cpu_ops = {
.name = KBUILD_MODNAME,
.init = dtpm_cpu_init,
+ .exit = dtpm_cpu_exit,
.setup = dtpm_cpu_setup,
};