diff options
author | Jean Delvare <khali@linux-fr.org> | 2009-03-30 15:46:42 -0400 |
---|---|---|
committer | Jean Delvare <khali@linux-fr.org> | 2009-03-30 15:46:42 -0400 |
commit | 1704b26ee3fd89c76724cbea238e951dc019faca (patch) | |
tree | 8ad08be8be5e6ae2eeb523cb03c2db2a24ca2506 /drivers/hwmon/w83627ehf.c | |
parent | b6a33fe2cc1b44851174967943fe5989f7e0550f (diff) |
hwmon: (w83627ehf) Invert fan pin variables logic
Use positive logic for fan pin variables (variable is set if pin is
used for fan), instead of negative logic which is error prone.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Gong Jun <JGong@nuvoton.com>
Diffstat (limited to 'drivers/hwmon/w83627ehf.c')
-rw-r--r-- | drivers/hwmon/w83627ehf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c index feae743ba991..18432e34dc7a 100644 --- a/drivers/hwmon/w83627ehf.c +++ b/drivers/hwmon/w83627ehf.c | |||
@@ -1317,8 +1317,8 @@ static int __devinit w83627ehf_probe(struct platform_device *pdev) | |||
1317 | 1317 | ||
1318 | /* fan4 and fan5 share some pins with the GPIO and serial flash */ | 1318 | /* fan4 and fan5 share some pins with the GPIO and serial flash */ |
1319 | 1319 | ||
1320 | fan5pin = superio_inb(sio_data->sioreg, 0x24) & 0x2; | 1320 | fan5pin = !(superio_inb(sio_data->sioreg, 0x24) & 0x2); |
1321 | fan4pin = superio_inb(sio_data->sioreg, 0x29) & 0x6; | 1321 | fan4pin = !(superio_inb(sio_data->sioreg, 0x29) & 0x6); |
1322 | superio_exit(sio_data->sioreg); | 1322 | superio_exit(sio_data->sioreg); |
1323 | 1323 | ||
1324 | /* It looks like fan4 and fan5 pins can be alternatively used | 1324 | /* It looks like fan4 and fan5 pins can be alternatively used |
@@ -1329,9 +1329,9 @@ static int __devinit w83627ehf_probe(struct platform_device *pdev) | |||
1329 | 1329 | ||
1330 | data->has_fan = 0x07; /* fan1, fan2 and fan3 */ | 1330 | data->has_fan = 0x07; /* fan1, fan2 and fan3 */ |
1331 | i = w83627ehf_read_value(data, W83627EHF_REG_FANDIV1); | 1331 | i = w83627ehf_read_value(data, W83627EHF_REG_FANDIV1); |
1332 | if ((i & (1 << 2)) && (!fan4pin)) | 1332 | if ((i & (1 << 2)) && fan4pin) |
1333 | data->has_fan |= (1 << 3); | 1333 | data->has_fan |= (1 << 3); |
1334 | if (!(i & (1 << 1)) && (!fan5pin)) | 1334 | if (!(i & (1 << 1)) && fan5pin) |
1335 | data->has_fan |= (1 << 4); | 1335 | data->has_fan |= (1 << 4); |
1336 | 1336 | ||
1337 | /* Read fan clock dividers immediately */ | 1337 | /* Read fan clock dividers immediately */ |