diff --git a/kernel/chips/w83627hf.c b/kernel/chips/w83627hf.c index 5c8cd856..296fb6eb 100644 --- a/kernel/chips/w83627hf.c +++ b/kernel/chips/w83627hf.c @@ -70,9 +70,9 @@ MODULE_PARM(init, "i"); MODULE_PARM_DESC(init, "Set to zero to bypass chip initialization"); /* modified from kernel/include/traps.c */ -#define REG 0x2e /* The register to read/write */ +static int REG; /* The register to read/write */ #define DEV 0x07 /* Register: Logical device select */ -#define VAL 0x2f /* The value to read/write */ +static int VAL; /* The value to read/write */ /* logical device numbers for superio_select (below) */ #define W83627HF_LD_FDC 0x00 @@ -588,10 +588,13 @@ static int w83627hf_attach_adapter(struct i2c_adapter *adapter) return i2c_detect(adapter, &addr_data, w83627hf_detect); } -static int w83627hf_find(int *address) +static int w83627hf_find(int sioaddr, int *address) { u16 val; + REG = sioaddr; + VAL = sioaddr + 1; + superio_enter(); val= superio_inb(DEVID); if(val != W627_DEVID && val !=W627THF_DEVID && val != W697_DEVID && val != W637_DEVID) { @@ -1413,7 +1416,8 @@ static int __init sm_w83627hf_init(void) int addr; printk(KERN_INFO "w83627hf.o version %s (%s)\n", LM_VERSION, LM_DATE); - if (w83627hf_find(&addr)) { + if (w83627hf_find(0x2e, &addr) + && w83627hf_find(0x4e, &addr)) { printk("w83627hf.o: W83627/697 not detected, module not inserted.\n"); return -ENODEV; }