mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
power: supply: apm_power: only unset own apm_get_power_status
Mirroring drivers/macintosh/apm_emu.c, this means that
modprobe apm_power && modprobe $anotherdriver && modprobe -r apm_power
leaves $anotherdriver's apm_get_power_status instead of deleting it.
Fixes: 3788ec932b ("[BATTERY] APM emulation driver for class batteries")
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Link: https://patch.msgid.link/xczpgox57hxbunkcbdl5fxhc4gnsajsipldfidi7355afezk64@tarta.nabijaczleweli.xyz
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
committed by
Sebastian Reichel
parent
3fd1695f5d
commit
bd44ea1291
@@ -364,7 +364,8 @@ static int __init apm_battery_init(void)
|
||||
|
||||
static void __exit apm_battery_exit(void)
|
||||
{
|
||||
apm_get_power_status = NULL;
|
||||
if (apm_get_power_status == apm_battery_apm_get_power_status)
|
||||
apm_get_power_status = NULL;
|
||||
}
|
||||
|
||||
module_init(apm_battery_init);
|
||||
|
||||
Reference in New Issue
Block a user