Skip to content

Commit

Permalink
hwmon: (adm1177) use simple i2c probe
Browse files Browse the repository at this point in the history
This driver doesn't use the id information provided by the old i2c
probe function, so it can trivially be converted to the simple
("probe_new") form.

Signed-off-by: Stephen Kitt <steve@sk2.org>
Link: https://lore.kernel.org/r/20200813160958.1506536-1-steve@sk2.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Stephen Kitt authored and Guenter Roeck committed Sep 23, 2020
1 parent 6748703 commit a391adf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/hwmon/adm1177.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,7 @@ static void adm1177_remove(void *data)
regulator_disable(st->reg);
}

static int adm1177_probe(struct i2c_client *client,
const struct i2c_device_id *id)
static int adm1177_probe(struct i2c_client *client)
{
struct device *dev = &client->dev;
struct device *hwmon_dev;
Expand Down Expand Up @@ -277,7 +276,7 @@ static struct i2c_driver adm1177_driver = {
.name = "adm1177",
.of_match_table = adm1177_dt_ids,
},
.probe = adm1177_probe,
.probe_new = adm1177_probe,
.id_table = adm1177_id,
};
module_i2c_driver(adm1177_driver);
Expand Down

0 comments on commit a391adf

Please sign in to comment.