浏览代码

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 年之前
父节点
当前提交
6e60c14810
共有 1 个文件被更改,包括 1 次插入1 次删除
  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 */