Skip to contentSkip to conversation

backlight: kb3886: Use usleep_range() instead of msleep() for small sleeps

PATCH In review Jingoo Han 1 participant 1 message Aug 6, 2012

Subsystems (2)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 3/3 backlight: kb3886: 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.

Cc Claudio Nieder <[email protected]>
Cc Richard Purdie <[email protected]>
---
 drivers/video/backlight/kb3886_bl.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/video/backlight/kb3886_bl.c +2 -2
index 72dd555..6c5ed6b 100644
@@ -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);
 }
Signature · 1 line
1.7.1