Skip to content

Commit 8f3f075

Browse files
Abhishek-Tamboli9lag-linaro
authored andcommitted
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]>
1 parent 17c40f3 commit 8f3f075

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/leds/leds-sun50i-a100.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ static int sun50i_a100_ledc_suspend(struct device *dev)
368368
if (!xfer_active)
369369
break;
370370

371-
msleep(1);
371+
usleep_range(1000, 1100);
372372
}
373373

374374
clk_disable_unprepare(priv->mod_clk);

0 commit comments

Comments
 (0)