From: Jingoo Han Date: Thu, 13 Sep 2012 01:01:08 +0000 (+1000) Subject: drivers/video/backlight/kb3886_bl.c: use usleep_range() instead of msleep() for small... X-Git-Tag: next-20120917~4^2~95 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=43159789aab5c68bb0924f32a1bd5c973ade17e9;p=karo-tx-linux.git drivers/video/backlight/kb3886_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: Claudio Nieder Cc: Richard Purdie Cc: Sachin Kamat Cc: Mark Brown Signed-off-by: Andrew Morton --- diff --git a/drivers/video/backlight/kb3886_bl.c b/drivers/video/backlight/kb3886_bl.c index 72dd5556a35b..6c5ed6b242cc 100644 --- a/drivers/video/backlight/kb3886_bl.c +++ b/drivers/video/backlight/kb3886_bl.c @@ -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); }