diff options
author | Stephen Kitt <steve@sk2.org> | 2020-08-21 18:03:54 +0200 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2020-09-23 18:42:40 +0200 |
commit | 673afe466166cda94053d2d2400e669fe19f8050 (patch) | |
tree | 358bd6aa76103330dd02854a6eacd61780dc4680 /drivers/hwmon/lm87.c | |
parent | hwmon: (ltc2947) use simple i2c probe (diff) | |
download | linux-673afe466166cda94053d2d2400e669fe19f8050.tar.xz linux-673afe466166cda94053d2d2400e669fe19f8050.zip |
hwmon: use simple i2c probe function (take 2)
Many hwmon drivers don't use the id information provided by the old
i2c probe function, and the remainder can easily be adapted to the new
form ("probe_new") by calling i2c_match_id explicitly.
This avoids scanning the identifier tables during probes.
Drivers which didn't use the id are converted as-is; drivers which did
are modified to call i2c_match_id() with the same level of
error-handling (if any) as before.
This patch wraps up the transition for hwmon, with four stragglers not
included in the previous large patch.
Signed-off-by: Stephen Kitt <steve@sk2.org>
Link: https://lore.kernel.org/r/20200821160354.594715-1-steve@sk2.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/lm87.c')
-rw-r--r-- | drivers/hwmon/lm87.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/lm87.c b/drivers/hwmon/lm87.c index c96c4d807e38..b2d820125bb6 100644 --- a/drivers/hwmon/lm87.c +++ b/drivers/hwmon/lm87.c @@ -912,7 +912,7 @@ static int lm87_init_client(struct i2c_client *client) return 0; } -static int lm87_probe(struct i2c_client *client, const struct i2c_device_id *id) +static int lm87_probe(struct i2c_client *client) { struct lm87_data *data; struct device *hwmon_dev; @@ -994,7 +994,7 @@ static struct i2c_driver lm87_driver = { .name = "lm87", .of_match_table = lm87_of_match, }, - .probe = lm87_probe, + .probe_new = lm87_probe, .id_table = lm87_id, .detect = lm87_detect, .address_list = normal_i2c, |