[PATCH] microblaze: iowrite upon timeout

From: Roel Kluin
Date: Thu Apr 16 2009 - 16:49:27 EST


retries reaches -1, so the iowrite occurrs upon timeout.

Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>
---
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 */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/