microblaze: iowrite upon timeout
authorRoel Kluin <roel.kluin@gmail.com>
Thu, 16 Apr 2009 20:49:17 +0000 (22:49 +0200)
committerMichal Simek <monstr@monstr.eu>
Thu, 23 Apr 2009 14:09:18 +0000 (16:09 +0200)
retries reaches -1, so the iowrite occurrs upon timeout.

Acked-by: John Williams <john.williams@petalogix.com>
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
arch/microblaze/kernel/early_printk.c

index 62cc789..4b0f0fd 100644 (file)
@@ -36,7 +36,7 @@ static void early_printk_putc(char c)
 
        unsigned retries = 10000;
        /* read status bit - 0x8 offset */
-       while (retries-- && (in_be32(base_addr + 8) & (1 << 3)))
+       while (--retries && (in_be32(base_addr + 8) & (1 << 3)))
                ;
 
        /* Only attempt the iowrite if we didn't timeout */