diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-02-21 19:43:15 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-21 20:22:21 -0500 |
commit | d2fff29042877154c3bc051a147bc7964a2e5fe2 (patch) | |
tree | 204a00450587f76b540e4af325336727cb61a668 /drivers/video | |
parent | 1be9ca2579aa901a86cfd353e10814a2dcfb15fe (diff) |
backlight: ld9040: use sleep instead of delay
Replace mdelay with msleep to remove the busy loop waiting.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/backlight/ld9040.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/video/backlight/ld9040.c b/drivers/video/backlight/ld9040.c index 1cb352418513..a52a6a7e572e 100644 --- a/drivers/video/backlight/ld9040.c +++ b/drivers/video/backlight/ld9040.c | |||
@@ -78,7 +78,7 @@ static void ld9040_regulator_enable(struct ld9040 *lcd) | |||
78 | 78 | ||
79 | lcd->enabled = true; | 79 | lcd->enabled = true; |
80 | } | 80 | } |
81 | mdelay(pd->power_on_delay); | 81 | msleep(pd->power_on_delay); |
82 | out: | 82 | out: |
83 | mutex_unlock(&lcd->lock); | 83 | mutex_unlock(&lcd->lock); |
84 | } | 84 | } |
@@ -474,8 +474,9 @@ static int ld9040_panel_send_sequence(struct ld9040 *lcd, | |||
474 | ret = ld9040_spi_write(lcd, wbuf[i], wbuf[i+1]); | 474 | ret = ld9040_spi_write(lcd, wbuf[i], wbuf[i+1]); |
475 | if (ret) | 475 | if (ret) |
476 | break; | 476 | break; |
477 | } else | 477 | } else { |
478 | udelay(wbuf[i+1]*1000); | 478 | msleep(wbuf[i+1]); |
479 | } | ||
479 | i += 2; | 480 | i += 2; |
480 | } | 481 | } |
481 | 482 | ||
@@ -539,7 +540,7 @@ static int ld9040_ldi_init(struct ld9040 *lcd) | |||
539 | for (i = 0; i < ARRAY_SIZE(init_seq); i++) { | 540 | for (i = 0; i < ARRAY_SIZE(init_seq); i++) { |
540 | ret = ld9040_panel_send_sequence(lcd, init_seq[i]); | 541 | ret = ld9040_panel_send_sequence(lcd, init_seq[i]); |
541 | /* workaround: minimum delay time for transferring CMD */ | 542 | /* workaround: minimum delay time for transferring CMD */ |
542 | udelay(300); | 543 | usleep_range(300, 310); |
543 | if (ret) | 544 | if (ret) |
544 | break; | 545 | break; |
545 | } | 546 | } |
@@ -584,7 +585,7 @@ static int ld9040_power_on(struct ld9040 *lcd) | |||
584 | return -EFAULT; | 585 | return -EFAULT; |
585 | } else { | 586 | } else { |
586 | pd->reset(lcd->ld); | 587 | pd->reset(lcd->ld); |
587 | mdelay(pd->reset_delay); | 588 | msleep(pd->reset_delay); |
588 | } | 589 | } |
589 | 590 | ||
590 | ret = ld9040_ldi_init(lcd); | 591 | ret = ld9040_ldi_init(lcd); |
@@ -619,7 +620,7 @@ static int ld9040_power_off(struct ld9040 *lcd) | |||
619 | return -EIO; | 620 | return -EIO; |
620 | } | 621 | } |
621 | 622 | ||
622 | mdelay(pd->power_off_delay); | 623 | msleep(pd->power_off_delay); |
623 | 624 | ||
624 | /* lcd power off */ | 625 | /* lcd power off */ |
625 | ld9040_regulator_disable(lcd); | 626 | ld9040_regulator_disable(lcd); |