]> Pileus Git - ~andy/linux/blobdiff - drivers/char/dtlk.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
[~andy/linux] / drivers / char / dtlk.c
index 6b900b297cc615f7687b8a320fd7ebc4987338a7..52e06589821d8ed53edef8bf96e02e0a95a9d430 100644 (file)
@@ -571,7 +571,7 @@ static char dtlk_read_tts(void)
                portval = inb_p(dtlk_port_tts);
        } while ((portval & TTS_READABLE) == 0 &&
                 retries++ < DTLK_MAX_RETRIES);
-       if (retries == DTLK_MAX_RETRIES)
+       if (retries > DTLK_MAX_RETRIES)
                printk(KERN_ERR "dtlk_read_tts() timeout\n");
 
        ch = inb_p(dtlk_port_tts);      /* input from TTS port */
@@ -583,7 +583,7 @@ static char dtlk_read_tts(void)
                portval = inb_p(dtlk_port_tts);
        } while ((portval & TTS_READABLE) != 0 &&
                 retries++ < DTLK_MAX_RETRIES);
-       if (retries == DTLK_MAX_RETRIES)
+       if (retries > DTLK_MAX_RETRIES)
                printk(KERN_ERR "dtlk_read_tts() timeout\n");
 
        TRACE_RET;
@@ -640,7 +640,7 @@ static char dtlk_write_tts(char ch)
                while ((inb_p(dtlk_port_tts) & TTS_WRITABLE) == 0 &&
                       retries++ < DTLK_MAX_RETRIES)    /* DT ready? */
                        ;
-       if (retries == DTLK_MAX_RETRIES)
+       if (retries > DTLK_MAX_RETRIES)
                printk(KERN_ERR "dtlk_write_tts() timeout\n");
 
        outb_p(ch, dtlk_port_tts);      /* output to TTS port */