aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2012-10-04 20:12:47 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-05 14:04:52 -0400
commit7c9332d19e54d3eb1beab931a43930fe7ad1d468 (patch)
tree4cebac91866399cf6bfcde349939fc644ccc4d9d
parenta08e1a376b0a31e0a978494deffed409fad9c531 (diff)
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 <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> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/video/backlight/kb3886_bl.c4
1 files changed, 2 insertions, 2 deletions
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)
34 mutex_lock(&bl_mutex); 34 mutex_lock(&bl_mutex);
35 intensity = intensity&0xff; 35 intensity = intensity&0xff;
36 outb(KB3886_ADC_DAC_PWM, KB3886_PARENT); 36 outb(KB3886_ADC_DAC_PWM, KB3886_PARENT);
37 msleep(10); 37 usleep_range(10000, 11000);
38 outb(KB3886_PWM0_WRITE, KB3886_IO); 38 outb(KB3886_PWM0_WRITE, KB3886_IO);
39 msleep(10); 39 usleep_range(10000, 11000);
40 outb(intensity, KB3886_IO); 40 outb(intensity, KB3886_IO);
41 mutex_unlock(&bl_mutex); 41 mutex_unlock(&bl_mutex);
42} 42}