diff options
author | Jean Delvare <khali@linux-fr.org> | 2006-12-12 12:18:29 -0500 |
---|---|---|
committer | Jean Delvare <khali@arrakis.delvare> | 2006-12-12 12:18:29 -0500 |
commit | 75c990291dd7af84ea68f3c3ead934b51d0b81ad (patch) | |
tree | 68525383de2cd7dc328e0e326a6c445d304532c2 /drivers/hwmon | |
parent | c7176cb515edbc937006fd05fa391b0d926a337a (diff) |
hwmon/f71805f: Fix the device address decoding
The lowest 3 bits are ignored, and the chip decodes all 8 addresses,
not only the 2 it needs.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/f71805f.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/hwmon/f71805f.c b/drivers/hwmon/f71805f.c index 37ba421789bc..a272cae8f60e 100644 --- a/drivers/hwmon/f71805f.c +++ b/drivers/hwmon/f71805f.c | |||
@@ -102,9 +102,9 @@ superio_exit(int base) | |||
102 | * ISA constants | 102 | * ISA constants |
103 | */ | 103 | */ |
104 | 104 | ||
105 | #define REGION_LENGTH 2 | 105 | #define REGION_LENGTH 8 |
106 | #define ADDR_REG_OFFSET 0 | 106 | #define ADDR_REG_OFFSET 5 |
107 | #define DATA_REG_OFFSET 1 | 107 | #define DATA_REG_OFFSET 6 |
108 | 108 | ||
109 | /* | 109 | /* |
110 | * Registers | 110 | * Registers |
@@ -1359,6 +1359,7 @@ static int __init f71805f_find(int sioaddr, unsigned short *address, | |||
1359 | "skipping\n"); | 1359 | "skipping\n"); |
1360 | goto exit; | 1360 | goto exit; |
1361 | } | 1361 | } |
1362 | *address &= ~(REGION_LENGTH - 1); /* Ignore 3 LSB */ | ||
1362 | 1363 | ||
1363 | err = 0; | 1364 | err = 0; |
1364 | printk(KERN_INFO DRVNAME ": Found %s chip at %#x, revision %u\n", | 1365 | printk(KERN_INFO DRVNAME ": Found %s chip at %#x, revision %u\n", |