From 0efe92ad9a0c32b0b3f87d3374c13fe9286f0574 Mon Sep 17 00:00:00 2001 From: "Mark D. Studebaker" Date: Sun, 30 Jan 2000 02:37:03 +0000 Subject: [PATCH] (mds) more parentheses in detection if statement - can't hurt. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@719 7894878c-1315-0410-8ee3-d5d059ff63e0 --- kernel/chips/w83781d.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/chips/w83781d.c b/kernel/chips/w83781d.c index 496c7e05..8442bd35 100644 --- a/kernel/chips/w83781d.c +++ b/kernel/chips/w83781d.c @@ -729,12 +729,12 @@ int w83781d_detect(struct i2c_adapter *adapter, int address, val1 = w83781d_read_value(new_client, W83781D_REG_BANK); val2 = w83781d_read_value(new_client, W83781D_REG_CHIPMAN); /* Check for Winbond or Asus ID if in bank 0 */ - if (!(val1 & 0x07) && - ((!(val1 & 0x80) && (val2 != 0xa3) && (val2 != 0xc3)) + if ((!(val1 & 0x07)) && + (((!(val1 & 0x80)) && (val2 != 0xa3) && (val2 != 0xc3)) || ((val1 & 0x80) && (val2 != 0x5c) && (val2 != 0x12)))) goto ERROR1; /* If Winbond SMBus, check address at 0x48. Asus doesn't support */ - if ((!is_isa) && ((!(val1 & 0x80) && (val2 == 0xa3)) || + if ((!is_isa) && (((!(val1 & 0x80)) && (val2 == 0xa3)) || ((val1 & 0x80) && (val2 == 0x5c)))) { if (w83781d_read_value (new_client, W83781D_REG_I2C_ADDR) != address)