From: Samuel Holland Date: Sat, 5 Nov 2022 21:29:09 +0000 (-0500) Subject: mfd: axp20x: Do not sleep in the power off handler X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3f37d4f695cff180033254b9ed5adc8ab927cba9;p=linux.git mfd: axp20x: Do not sleep in the power off handler 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 Reviewed-by: Dmitry Osipenko Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221105212909.6526-1-samuel@sholland.org --- diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index 88a212a8168cf..880c41fa7021b 100644 --- a/drivers/mfd/axp20x.c +++ b/drivers/mfd/axp20x.c @@ -842,7 +842,7 @@ static void axp20x_power_off(void) AXP20X_OFF); /* Give capacitors etc. time to drain to avoid kernel panic msg. */ - msleep(500); + mdelay(500); } int axp20x_match_device(struct axp20x_dev *axp20x)