mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Samuel Holland <samuel@sholland.org>
To: Chen-Yu Tsai <wens@csie.org>, Lee Jones <lee@kernel.org>
Cc: "Samuel Holland" <samuel@sholland.org>,
	"Dmitry Osipenko" <dmitry.osipenko@collabora.com>,
	"Michał Mirosław" <mirq-linux@rere.qmqm.pl>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	"Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] mfd: axp20x: Do not sleep in the power off handler
Date: Sat,  5 Nov 2022 16:29:09 -0500	[thread overview]
Message-ID: <20221105212909.6526-1-samuel@sholland.org> (raw)

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>
---

 drivers/mfd/axp20x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
index 88a212a8168c..880c41fa7021 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)
-- 
2.37.3


             reply	other threads:[~2022-11-05 21:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-05 21:29 Samuel Holland [this message]
2022-11-06 22:40 ` Dmitry Osipenko
2022-11-07  9:39   ` Lee Jones
2022-11-07 11:39     ` Dmitry Osipenko
2022-11-14 11:03       ` Lee Jones
2022-11-07 14:33   ` Samuel Holland
2022-11-07  9:38 ` Lee Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221105212909.6526-1-samuel@sholland.org \
    --to=samuel@sholland.org \
    --cc=dmitry.osipenko@collabora.com \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mirq-linux@rere.qmqm.pl \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®