]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ACPI: battery: Simplify battery hook locking
authorArmin Wolf <W_Armin@gmx.de>
Tue, 1 Oct 2024 21:28:33 +0000 (23:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:11:47 +0000 (15:11 +0200)
commiteb7924f88f8afe06f21cff6d915562b82e49ff33
tree4cff148e4441a215576f22615d677befedd18cd0
parenta1a37348195b08bed62128a04bf9c84ba5b56ee4
ACPI: battery: Simplify battery hook locking

[ Upstream commit 86309cbed26139e1caae7629dcca1027d9a28e75 ]

Move the conditional locking from __battery_hook_unregister()
into battery_hook_unregister() and rename the low-level function
to simplify the locking during battery hook removal.

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://patch.msgid.link/20241001212835.341788-2-W_Armin@gmx.de
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Stable-dep-of: 76959aff14a0 ("ACPI: battery: Fix possible crash when unregistering a battery hook")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/acpi/battery.c