Commit bd44ea12 authored by Ahelenia Ziemiańska's avatar Ahelenia Ziemiańska Committed by Sebastian Reichel
Browse files

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: 3788ec93 ("[BATTERY] APM emulation driver for class batteries")
Signed-off-by: default avatarAhelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Link: https://patch.msgid.link/xczpgox57hxbunkcbdl5fxhc4gnsajsipldfidi7355afezk64@tarta.nabijaczleweli.xyz


Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 3fd1695f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -364,6 +364,7 @@ static int __init apm_battery_init(void)

static void __exit apm_battery_exit(void)
{
	if (apm_get_power_status == apm_battery_apm_get_power_status)
		apm_get_power_status = NULL;
}