]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers/video/backlight/da9052_bl.c: use usleep_range() instead of msleep() for small...
authorJingoo Han <jg1.han@samsung.com>
Fri, 7 Sep 2012 00:24:48 +0000 (10:24 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 10 Sep 2012 06:18:15 +0000 (16:18 +1000)
Since msleep() might not sleep for the desired amount when less than 20ms,
use usleep_range().

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: Ashish Jangam <ashish.jangam@kpitcummins.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/video/backlight/da9052_bl.c

index b628d68f516284ea69f9ab204532d183d5ce0dc8..10485c927ac65a993c58068737d029e03335a5e9 100644 (file)
@@ -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],