aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhishek Tamboli <[email protected]>2024-08-16 22:41:29 +0530
committerLee Jones <[email protected]>2024-08-22 11:39:47 +0100
commit8f3f07517834382e819e168740bf855273f13d47 (patch)
tree231c07beaf40a3ecab9d37ce21e833deee7ca7b7
parent17c40f3c94bc2279b879ea9ceb3eea973bcd1ac4 (diff)
leds: sun50i-a100: Replace msleep() with usleep_range()
Replace msleep() with usleep_range() in sun50i_a100_ledc_suspend() to address the checkpatch.pl warning. msleep() for such short delay can lead to inaccurate sleep times. Switch to usleep_range() provide more precise delay. Fix the following warning from checkpatch.pl: WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.rst + msleep(1); Signed-off-by: Abhishek Tamboli <[email protected]> Acked-by: Chen-Yu Tsai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
-rw-r--r--drivers/leds/leds-sun50i-a100.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/leds/leds-sun50i-a100.c b/drivers/leds/leds-sun50i-a100.c
index 119eff9471f0..4c468d487486 100644
--- a/drivers/leds/leds-sun50i-a100.c
+++ b/drivers/leds/leds-sun50i-a100.c
@@ -368,7 +368,7 @@ static int sun50i_a100_ledc_suspend(struct device *dev)
if (!xfer_active)
break;
- msleep(1);
+ usleep_range(1000, 1100);
}
clk_disable_unprepare(priv->mod_clk);