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>
This commit is contained in:
Jean Delvare 2006-12-12 18:18:29 +01:00 коммит произвёл Jean Delvare
Родитель c7176cb515
Коммит 75c990291d
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -102,9 +102,9 @@ superio_exit(int base)
* ISA constants * ISA constants
*/ */
#define REGION_LENGTH 2 #define REGION_LENGTH 8
#define ADDR_REG_OFFSET 0 #define ADDR_REG_OFFSET 5
#define DATA_REG_OFFSET 1 #define DATA_REG_OFFSET 6
/* /*
* Registers * Registers
@ -1359,6 +1359,7 @@ static int __init f71805f_find(int sioaddr, unsigned short *address,
"skipping\n"); "skipping\n");
goto exit; goto exit;
} }
*address &= ~(REGION_LENGTH - 1); /* Ignore 3 LSB */
err = 0; err = 0;
printk(KERN_INFO DRVNAME ": Found %s chip at %#x, revision %u\n", printk(KERN_INFO DRVNAME ": Found %s chip at %#x, revision %u\n",