mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
drivers/video/backlight/ltv350qv.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: Haavard Skinnemoen <[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
5333e254ab
commit
a08e1a376b
1 changed files with 3 additions and 3 deletions
|
|
@ -75,7 +75,7 @@ static int ltv350qv_power_on(struct ltv350qv *lcd)
|
|||
/* Power On Reset Display off State */
|
||||
if (ltv350qv_write_reg(lcd, LTV_PWRCTL1, 0x0000))
|
||||
goto err;
|
||||
msleep(15);
|
||||
usleep_range(15000, 16000);
|
||||
|
||||
/* Power Setting Function 1 */
|
||||
if (ltv350qv_write_reg(lcd, LTV_PWRCTL1, LTV_VCOM_DISABLE))
|
||||
|
|
@ -153,7 +153,7 @@ err_settings:
|
|||
err_power2:
|
||||
err_power1:
|
||||
ltv350qv_write_reg(lcd, LTV_PWRCTL2, 0x0000);
|
||||
msleep(1);
|
||||
usleep_range(1000, 1100);
|
||||
err:
|
||||
ltv350qv_write_reg(lcd, LTV_PWRCTL1, LTV_VCOM_DISABLE);
|
||||
return -EIO;
|
||||
|
|
@ -175,7 +175,7 @@ static int ltv350qv_power_off(struct ltv350qv *lcd)
|
|||
ret |= ltv350qv_write_reg(lcd, LTV_PWRCTL2, 0x0000);
|
||||
|
||||
/* Wait at least 1 ms */
|
||||
msleep(1);
|
||||
usleep_range(1000, 1100);
|
||||
|
||||
/* Power down setting 2 */
|
||||
ret |= ltv350qv_write_reg(lcd, LTV_PWRCTL1, LTV_VCOM_DISABLE);
|
||||
|
|
|
|||
Loading…
Reference in a new issue