]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers/video/backlight/kb3886_bl.c: use usleep_range() instead of msleep() for small...
authorJingoo Han <jg1.han@samsung.com>
Wed, 26 Sep 2012 01:34:20 +0000 (11:34 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 27 Sep 2012 07:27:42 +0000 (17:27 +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: Claudio Nieder <private@claudio.ch>
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/kb3886_bl.c

index 72dd5556a35bdbe825f4fb86033f82828f206bc3..6c5ed6b242cc06f87706fe7dd85a4700a743ca82 100644 (file)
@@ -34,9 +34,9 @@ static void kb3886_bl_set_intensity(int intensity)
        mutex_lock(&bl_mutex);
        intensity = intensity&0xff;
        outb(KB3886_ADC_DAC_PWM, KB3886_PARENT);
-       msleep(10);
+       usleep_range(10000, 11000);
        outb(KB3886_PWM0_WRITE, KB3886_IO);
-       msleep(10);
+       usleep_range(10000, 11000);
        outb(intensity, KB3886_IO);
        mutex_unlock(&bl_mutex);
 }