Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+7
+7
drivers/powercap/dtpm_cpu.c
··· 299 299 return 0; 300 300 } 301 301 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 + 302 308 struct dtpm_subsys_ops dtpm_cpu_ops = { 303 309 .name = KBUILD_MODNAME, 304 310 .init = dtpm_cpu_init, 311 + .exit = dtpm_cpu_exit, 305 312 .setup = dtpm_cpu_setup, 306 313 };