diff options
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/dtlk.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/char/dtlk.c b/drivers/char/dtlk.c index 6b900b297cc6..52e06589821d 100644 --- a/drivers/char/dtlk.c +++ b/drivers/char/dtlk.c | |||
@@ -571,7 +571,7 @@ static char dtlk_read_tts(void) | |||
571 | portval = inb_p(dtlk_port_tts); | 571 | portval = inb_p(dtlk_port_tts); |
572 | } while ((portval & TTS_READABLE) == 0 && | 572 | } while ((portval & TTS_READABLE) == 0 && |
573 | retries++ < DTLK_MAX_RETRIES); | 573 | retries++ < DTLK_MAX_RETRIES); |
574 | if (retries == DTLK_MAX_RETRIES) | 574 | if (retries > DTLK_MAX_RETRIES) |
575 | printk(KERN_ERR "dtlk_read_tts() timeout\n"); | 575 | printk(KERN_ERR "dtlk_read_tts() timeout\n"); |
576 | 576 | ||
577 | ch = inb_p(dtlk_port_tts); /* input from TTS port */ | 577 | ch = inb_p(dtlk_port_tts); /* input from TTS port */ |
@@ -583,7 +583,7 @@ static char dtlk_read_tts(void) | |||
583 | portval = inb_p(dtlk_port_tts); | 583 | portval = inb_p(dtlk_port_tts); |
584 | } while ((portval & TTS_READABLE) != 0 && | 584 | } while ((portval & TTS_READABLE) != 0 && |
585 | retries++ < DTLK_MAX_RETRIES); | 585 | retries++ < DTLK_MAX_RETRIES); |
586 | if (retries == DTLK_MAX_RETRIES) | 586 | if (retries > DTLK_MAX_RETRIES) |
587 | printk(KERN_ERR "dtlk_read_tts() timeout\n"); | 587 | printk(KERN_ERR "dtlk_read_tts() timeout\n"); |
588 | 588 | ||
589 | TRACE_RET; | 589 | TRACE_RET; |
@@ -640,7 +640,7 @@ static char dtlk_write_tts(char ch) | |||
640 | while ((inb_p(dtlk_port_tts) & TTS_WRITABLE) == 0 && | 640 | while ((inb_p(dtlk_port_tts) & TTS_WRITABLE) == 0 && |
641 | retries++ < DTLK_MAX_RETRIES) /* DT ready? */ | 641 | retries++ < DTLK_MAX_RETRIES) /* DT ready? */ |
642 | ; | 642 | ; |
643 | if (retries == DTLK_MAX_RETRIES) | 643 | if (retries > DTLK_MAX_RETRIES) |
644 | printk(KERN_ERR "dtlk_write_tts() timeout\n"); | 644 | printk(KERN_ERR "dtlk_write_tts() timeout\n"); |
645 | 645 | ||
646 | outb_p(ch, dtlk_port_tts); /* output to TTS port */ | 646 | outb_p(ch, dtlk_port_tts); /* output to TTS port */ |