diff options
Diffstat (limited to 'drivers/hwmon/it87.c')
-rw-r--r-- | drivers/hwmon/it87.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c index a438adb4b09f..722ef0cd5c00 100644 --- a/drivers/hwmon/it87.c +++ b/drivers/hwmon/it87.c | |||
@@ -48,7 +48,8 @@ | |||
48 | /* Addresses to scan */ | 48 | /* Addresses to scan */ |
49 | static unsigned short normal_i2c[] = { 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, | 49 | static unsigned short normal_i2c[] = { 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, |
50 | 0x2e, 0x2f, I2C_CLIENT_END }; | 50 | 0x2e, 0x2f, I2C_CLIENT_END }; |
51 | static unsigned int normal_isa[] = { 0x0290, I2C_CLIENT_ISA_END }; | 51 | static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END }; |
52 | static unsigned short isa_address = 0x290; | ||
52 | 53 | ||
53 | /* Insmod parameters */ | 54 | /* Insmod parameters */ |
54 | SENSORS_INSMOD_2(it87, it8712); | 55 | SENSORS_INSMOD_2(it87, it8712); |
@@ -222,7 +223,7 @@ struct it87_data { | |||
222 | 223 | ||
223 | 224 | ||
224 | static int it87_attach_adapter(struct i2c_adapter *adapter); | 225 | static int it87_attach_adapter(struct i2c_adapter *adapter); |
225 | static int it87_find(int *address); | 226 | static int it87_isa_attach_adapter(struct i2c_adapter *adapter); |
226 | static int it87_detect(struct i2c_adapter *adapter, int address, int kind); | 227 | static int it87_detect(struct i2c_adapter *adapter, int address, int kind); |
227 | static int it87_detach_client(struct i2c_client *client); | 228 | static int it87_detach_client(struct i2c_client *client); |
228 | 229 | ||
@@ -246,7 +247,7 @@ static struct i2c_driver it87_driver = { | |||
246 | static struct i2c_driver it87_isa_driver = { | 247 | static struct i2c_driver it87_isa_driver = { |
247 | .owner = THIS_MODULE, | 248 | .owner = THIS_MODULE, |
248 | .name = "it87-isa", | 249 | .name = "it87-isa", |
249 | .attach_adapter = it87_attach_adapter, | 250 | .attach_adapter = it87_isa_attach_adapter, |
250 | .detach_client = it87_detach_client, | 251 | .detach_client = it87_detach_client, |
251 | }; | 252 | }; |
252 | 253 | ||
@@ -701,7 +702,12 @@ static int it87_attach_adapter(struct i2c_adapter *adapter) | |||
701 | return i2c_detect(adapter, &addr_data, it87_detect); | 702 | return i2c_detect(adapter, &addr_data, it87_detect); |
702 | } | 703 | } |
703 | 704 | ||
704 | /* SuperIO detection - will change normal_isa[0] if a chip is found */ | 705 | static int it87_isa_attach_adapter(struct i2c_adapter *adapter) |
706 | { | ||
707 | return it87_detect(adapter, isa_address, -1); | ||
708 | } | ||
709 | |||
710 | /* SuperIO detection - will change isa_address if a chip is found */ | ||
705 | static int it87_find(int *address) | 711 | static int it87_find(int *address) |
706 | { | 712 | { |
707 | int err = -ENODEV; | 713 | int err = -ENODEV; |
@@ -1184,7 +1190,7 @@ static int __init sm_it87_init(void) | |||
1184 | int addr, res; | 1190 | int addr, res; |
1185 | 1191 | ||
1186 | if (!it87_find(&addr)) { | 1192 | if (!it87_find(&addr)) { |
1187 | normal_isa[0] = addr; | 1193 | isa_address = addr; |
1188 | } | 1194 | } |
1189 | 1195 | ||
1190 | res = i2c_add_driver(&it87_driver); | 1196 | res = i2c_add_driver(&it87_driver); |