]> www.infradead.org Git - users/jedix/linux-maple.git/commit
power: supply: core: Remove might_sleep() from power_supply_put()
authorBart Van Assche <bvanassche@acm.org>
Tue, 17 Sep 2024 19:39:14 +0000 (12:39 -0700)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Tue, 15 Oct 2024 20:35:53 +0000 (22:35 +0200)
commitf6da4553ff24a5d1c959c9627c965323adc3d307
tree0d89b17885bcbc396193fc922a11dff0f13d6631
parent85d319e14f301e1c68131b74c1dceabae73d1e81
power: supply: core: Remove might_sleep() from power_supply_put()

The put_device() call in power_supply_put() may call
power_supply_dev_release(). The latter function does not sleep so
power_supply_put() doesn't sleep either. Hence, remove the might_sleep()
call from power_supply_put(). This patch suppresses false positive
complaints about calling a sleeping function from atomic context if
power_supply_put() is called from atomic context.

Cc: Kyle Tso <kyletso@google.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Fixes: 1a352462b537 ("power_supply: Add power_supply_put for decrementing device reference counter")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240917193914.47566-1-bvanassche@acm.org
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/power_supply_core.c