From: Jingoo Han Date: Fri, 5 Oct 2012 00:12:42 +0000 (-0700) Subject: drivers/video/backlight/da9052_bl.c: use usleep_range() instead of msleep() for small... X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5333e254ab3fd3720b172091669f537763bce23d;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.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 Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/backlight/da9052_bl.c b/drivers/video/backlight/da9052_bl.c index b628d68f516..10485c927ac 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],