From: Seung-Woo Kim Date: Fri, 6 Dec 2024 06:07:28 +0000 (+0900) Subject: inform-reboot: Support unload module with exit function X-Git-Tag: accepted/tizen/unified/20241209.090231^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ab386e312e9b9c7f24e4e18e8af2e4630097de3e;p=platform%2Fkernel%2Flinux-tizen-modules-source.git inform-reboot: Support unload module with exit function Without exit function, reboot notifier is not unregistered, so unloading is failed with busy error. Add exit function unregistering reboot notifier to support unload. Change-Id: Id2fb51f7b6635d0a2bee11ed7ef1bfa96c46ac5c Signed-off-by: Seung-Woo Kim --- diff --git a/kernel/inform-reboot.c b/kernel/inform-reboot.c index c330301..2f96bac 100644 --- a/kernel/inform-reboot.c +++ b/kernel/inform-reboot.c @@ -68,6 +68,12 @@ static int __init inform_reboot_init(void) return 0; } +static void inform_reboot_exit(void) +{ + unregister_reboot_notifier(&nb_inform_reboot_block); +} + subsys_initcall(inform_reboot_init); +module_exit(inform_reboot_exit); MODULE_LICENSE("GPL");