diff options
Diffstat (limited to 'drivers/hwmon/lm78.c')
| -rw-r--r-- | drivers/hwmon/lm78.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/hwmon/lm78.c b/drivers/hwmon/lm78.c index b739c354311b..9378a47bf5af 100644 --- a/drivers/hwmon/lm78.c +++ b/drivers/hwmon/lm78.c @@ -627,8 +627,6 @@ static int lm78_i2c_detect(struct i2c_client *client, return -ENODEV; } -static const struct i2c_device_id lm78_i2c_id[]; - static int lm78_i2c_probe(struct i2c_client *client) { struct device *dev = &client->dev; @@ -640,7 +638,7 @@ static int lm78_i2c_probe(struct i2c_client *client) return -ENOMEM; data->client = client; - data->type = i2c_match_id(lm78_i2c_id, client)->driver_data; + data->type = (uintptr_t)i2c_get_match_data(client); /* Initialize the LM78 chip */ lm78_init_device(data); @@ -845,17 +843,18 @@ static int __init lm78_isa_found(unsigned short address) } } -#define REALLY_SLOW_IO /* * We need the timeouts for at least some LM78-like * chips. But only if we read 'undefined' registers. + * There used to be a "#define REALLY_SLOW_IO" to enforce that, but + * this has been without any effect since more than a decade, so it + * has been dropped. */ val = inb_p(address + 1); if (inb_p(address + 2) != val || inb_p(address + 3) != val || inb_p(address + 7) != val) goto release; -#undef REALLY_SLOW_IO /* * We should be able to change the 7 LSB of the address port. The |
