From: Jingoo Han Date: Wed, 26 Sep 2012 01:34:19 +0000 (+1000) Subject: drivers/video/backlight/da9052_bl.c: use usleep_range() instead of msleep() for small... X-Git-Tag: next-20120926~2^2~146 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e82d82d4da5dffe886589feade5e459700f7dc8f;p=karo-tx-linux.git drivers/video/backlight/da9052_bl.c: use usleep_range() instead of msleep() for small sleeps Since msleep() might not sleep for the desired amount when less than 20ms, use usleep_range(). Signed-off-by: Jingoo Han Cc: Ashish Jangam Cc: Richard Purdie Cc: Sachin Kamat Cc: Mark Brown Signed-off-by: Andrew Morton --- diff --git a/drivers/video/backlight/da9052_bl.c b/drivers/video/backlight/da9052_bl.c index b628d68f5162..10485c927ac6 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],