Messages in this thread Patch in this message | | | Date | Thu, 16 Apr 2009 22:49:17 +0200 | From | Roel Kluin <> | Subject | [PATCH] microblaze: iowrite upon timeout |
| |
retries reaches -1, so the iowrite occurrs upon timeout.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com> --- diff --git a/arch/microblaze/kernel/early_printk.c b/arch/microblaze/kernel/early_printk.c index 62cc789..4b0f0fd 100644 --- a/arch/microblaze/kernel/early_printk.c +++ b/arch/microblaze/kernel/early_printk.c @@ -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 */
| |