Skip to content

Commit bfded2c

Browse files
committed
powercap/dtpm_cpu: Add exit function
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
1 parent 4712a23 commit bfded2c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

drivers/powercap/dtpm_cpu.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,15 @@ static int dtpm_cpu_init(void)
299299
return 0;
300300
}
301301

302+
static void dtpm_cpu_exit(void)
303+
{
304+
cpuhp_remove_state_nocalls(CPUHP_AP_ONLINE_DYN);
305+
cpuhp_remove_state_nocalls(CPUHP_AP_DTPM_CPU_DEAD);
306+
}
307+
302308
struct dtpm_subsys_ops dtpm_cpu_ops = {
303309
.name = KBUILD_MODNAME,
304310
.init = dtpm_cpu_init,
311+
.exit = dtpm_cpu_exit,
305312
.setup = dtpm_cpu_setup,
306313
};

0 commit comments

Comments
 (0)