]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
platform/loongarch: laptop: Unregister generic_sub_drivers on exit
authorYao Zi <ziyao@disroot.org>
Thu, 5 Jun 2025 12:34:46 +0000 (20:34 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:07:36 +0000 (11:07 +0100)
commit9ae4c02a76c1942a892a9a5e1623c7f022904aa0
treebc1758f58a312cb680ef932c2e4b3401b916522d
parentf9d339839ffda763f3b0851abf74b1f9d4b00b07
platform/loongarch: laptop: Unregister generic_sub_drivers on exit

commit f78fb2576f22b0ba5297412a9aa7691920666c41 upstream.

Without correct unregisteration, ACPI notify handlers and the platform
drivers installed by generic_subdriver_init() will become dangling
references after removing the loongson_laptop module, triggering various
kernel faults when a hotkey is sent or at kernel shutdown.

Cc: stable@vger.kernel.org
Fixes: 6246ed09111f ("LoongArch: Add ACPI-based generic laptop driver")
Signed-off-by: Yao Zi <ziyao@disroot.org>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/platform/loongarch/loongson-laptop.c