mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/3] backlight: da9052: Use usleep_range() instead of msleep() for small sleeps
@ 2012-08-06  4:43 Jingoo Han
  2012-08-06  4:47 ` Sachin Kamat
  0 siblings, 1 reply; 4+ messages in thread
From: Jingoo Han @ 2012-08-06  4:43 UTC (permalink / raw)
  To: 'Andrew Morton', 'LKML'
  Cc: 'Richard Purdie', 'Ashish Jangam', 'Jingoo Han'

Since msleep might not sleep for the desired amount when less
than 20ms, use usleep_range.

Cc: Ashish Jangam <ashish.jangam@kpitcummins.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/video/backlight/da9052_bl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/backlight/da9052_bl.c b/drivers/video/backlight/da9052_bl.c
index b628d68..10485c9 100644
--- a/drivers/video/backlight/da9052_bl.c
+++ b/drivers/video/backlight/da9052_bl.c
@@ -72,7 +72,7 @@ static int da9052_adjust_wled_brightness(struct da9052_bl *wleds)
 	if (ret < 0)
 		return ret;
 
-	msleep(10);
+	usleep_range(10000, 11000);
 
 	if (wleds->brightness) {
 		ret = da9052_reg_write(wleds->da9052, wled_bank[wleds->led_reg],
-- 
1.7.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-08-07 16:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-06  4:43 [PATCH 1/3] backlight: da9052: Use usleep_range() instead of msleep() for small sleeps Jingoo Han
2012-08-06  4:47 ` Sachin Kamat
2012-08-06  4:59   ` Jingoo Han
2012-08-07 16:28     ` Mark Brown

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®