Browse Source

microblaze: iowrite upon timeout

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>
Roel Kluin 16 năm trước cách đây
mục cha
commit
6e60c14810
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      arch/microblaze/kernel/early_printk.c

+ 1 - 1
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 */