[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240816171129.6411-1-abhishektamboli9@gmail.com>
Date: Fri, 16 Aug 2024 22:41:29 +0530
From: Abhishek Tamboli <abhishektamboli9@...il.com>
To: pavel@....cz,
lee@...nel.org,
wens@...e.org,
jernej.skrabec@...il.com,
samuel@...lland.org
Cc: linux-leds@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-sunxi@...ts.linux.dev,
skhan@...uxfoundation.org,
rbmarliere@...il.com,
linux-kernel-mentees@...ts.linuxfoundation.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] 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 <abhishektamboli9@...il.com>
---
drivers/leds/leds-sun50i-a100.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
2.34.1
Powered by blists - more mailing lists