summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/dss.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@nokia.com>2010-01-07 14:19:48 +0200
committerTomi Valkeinen <tomi.valkeinen@nokia.com>2010-01-11 14:45:26 +0200
commit24be78b32f0a6e14aead3eac89d768a361b091b3 (patch)
tree38f1f736bf0faa638d2fe1f45a356b802f021ca4 /drivers/video/omap2/dss/dss.c
parentf3a82d11d478a9eb5ff0cfa83796f0ba8149d841 (diff)
downloadlinux-stable-24be78b32f0a6e14aead3eac89d768a361b091b3.tar.gz
linux-stable-24be78b32f0a6e14aead3eac89d768a361b091b3.tar.bz2
linux-stable-24be78b32f0a6e14aead3eac89d768a361b091b3.zip
OMAP: DSS2: Make check-delay-loops consistent
Loops checking for certain condition were rather inconsistent. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com> Reported-by: Juha Leppanen <juha_motorsportcom@luukku.com>
Diffstat (limited to 'drivers/video/omap2/dss/dss.c')
-rw-r--r--drivers/video/omap2/dss/dss.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
index 9b05ee65a15d..0a26b7d84d41 100644
--- a/drivers/video/omap2/dss/dss.c
+++ b/drivers/video/omap2/dss/dss.c
@@ -467,14 +467,14 @@ static irqreturn_t dss_irq_handler_omap3(int irq, void *arg)
static int _omap_dss_wait_reset(void)
{
- unsigned timeout = 1000;
+ int t = 0;
while (REG_GET(DSS_SYSSTATUS, 0, 0) == 0) {
- udelay(1);
- if (!--timeout) {
+ if (++t > 1000) {
DSSERR("soft reset failed\n");
return -ENODEV;
}
+ udelay(1);
}
return 0;