summaryrefslogtreecommitdiff
path: root/drivers/hwmon/w83781d.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/w83781d.c')
-rw-r--r--drivers/hwmon/w83781d.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/hwmon/w83781d.c b/drivers/hwmon/w83781d.c
index dacabf25e83f..f664c2152a6d 100644
--- a/drivers/hwmon/w83781d.c
+++ b/drivers/hwmon/w83781d.c
@@ -1192,8 +1192,6 @@ static void w83781d_remove_files(struct device *dev)
sysfs_remove_group(&dev->kobj, &w83781d_group_other);
}
-static const struct i2c_device_id w83781d_ids[];
-
static int w83781d_probe(struct i2c_client *client)
{
struct device *dev = &client->dev;
@@ -1208,7 +1206,7 @@ static int w83781d_probe(struct i2c_client *client)
mutex_init(&data->lock);
mutex_init(&data->update_lock);
- data->type = i2c_match_id(w83781d_ids, client)->driver_data;
+ data->type = (uintptr_t)i2c_get_match_data(client);
data->client = client;
/* attach secondary i2c lm75-like clients */
@@ -1585,7 +1583,7 @@ static struct i2c_driver w83781d_driver = {
.name = "w83781d",
.of_match_table = w83781d_of_match,
},
- .probe_new = w83781d_probe,
+ .probe = w83781d_probe,
.remove = w83781d_remove,
.id_table = w83781d_ids,
.detect = w83781d_detect,
@@ -1816,16 +1814,13 @@ w83781d_isa_probe(struct platform_device *pdev)
return err;
}
-static int
-w83781d_isa_remove(struct platform_device *pdev)
+static void w83781d_isa_remove(struct platform_device *pdev)
{
struct w83781d_data *data = platform_get_drvdata(pdev);
hwmon_device_unregister(data->hwmon_dev);
w83781d_remove_files(&pdev->dev);
device_remove_file(&pdev->dev, &dev_attr_name);
-
- return 0;
}
static struct platform_driver w83781d_isa_driver = {
@@ -1855,10 +1850,12 @@ w83781d_isa_found(unsigned short address)
}
}
-#define REALLY_SLOW_IO
/*
* We need the timeouts for at least some W83781D-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
@@ -1867,7 +1864,6 @@ w83781d_isa_found(unsigned short address)
pr_debug("Detection failed at step %d\n", 1);
goto release;
}
-#undef REALLY_SLOW_IO
/*
* We should be able to change the 7 LSB of the address port. The