mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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 <[email protected]> Cc: Claudio Nieder <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Sachin Kamat <[email protected]> Cc: Mark Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
a08e1a376b
commit
7c9332d19e
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue