mfd: axp20x: Do not sleep in the power off handler
authorSamuel Holland <samuel@sholland.org>
Sat, 5 Nov 2022 21:29:09 +0000 (16:29 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:52 +0000 (13:32 +0100)
commit3bcc06c5fd4842841763c398f301ea1291d0b653
tree7687783d630afad091baa5be1dca10a6025fccfa
parentd387d36fcc545f6563f3a197ee87352cfd0cbde2
mfd: axp20x: Do not sleep in the power off handler

[ Upstream commit 3f37d4f695cff180033254b9ed5adc8ab927cba9 ]

Since commit 856c288b0039 ("ARM: Use do_kernel_power_off()"), the
function axp20x_power_off() now runs inside a RCU read-side critical
section, so it is not allowed to call msleep(). Use mdelay() instead.

Fixes: 856c288b0039 ("ARM: Use do_kernel_power_off()")
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221105212909.6526-1-samuel@sholland.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mfd/axp20x.c