Skip to content

Commit

Permalink
drivers/video/backlight/kb3886_bl.c: use usleep_range() instead of ms…
Browse files Browse the repository at this point in the history
…leep() 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>
  • Loading branch information
Jingoo Han authored and Linus Torvalds committed Oct 5, 2012
1 parent a08e1a3 commit 7c9332d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/video/backlight/kb3886_bl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 7c9332d

Please sign in to comment.