提交 6899a8e1 编写于 作者: D Dan Carpenter 提交者: Wim Van Sebroeck

watchdog: sch311x_wdt: fix printk condition

"==" has higher precedence than "&".  Since
if (sch311x_sio_inb(sio_config_port, 0x30) & (0x01 == 0)) is always
false the message is never printed.
Signed-off-by: NDan Carpenter <error27@gmail.com>
Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
上级 a450c786
...@@ -508,7 +508,7 @@ static int __init sch311x_detect(int sio_config_port, unsigned short *addr) ...@@ -508,7 +508,7 @@ static int __init sch311x_detect(int sio_config_port, unsigned short *addr)
sch311x_sio_outb(sio_config_port, 0x07, 0x0a); sch311x_sio_outb(sio_config_port, 0x07, 0x0a);
/* Check if Logical Device Register is currently active */ /* Check if Logical Device Register is currently active */
if (sch311x_sio_inb(sio_config_port, 0x30) & 0x01 == 0) if ((sch311x_sio_inb(sio_config_port, 0x30) & 0x01) == 0)
printk(KERN_INFO PFX "Seems that LDN 0x0a is not active...\n"); printk(KERN_INFO PFX "Seems that LDN 0x0a is not active...\n");
/* Get the base address of the runtime registers */ /* Get the base address of the runtime registers */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册