diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2022-11-18 23:40:28 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-11-24 13:12:16 +0100 |
commit | 51a9e1755cdd8b127191030d15b74b97f7d3ce75 (patch) | |
tree | ab4046b4770eab4d429ddf3f96898e63331ed59d /drivers/macintosh | |
parent | macintosh/windfarm_fcu_controls: Convert to i2c's .probe_new() (diff) | |
download | linux-51a9e1755cdd8b127191030d15b74b97f7d3ce75.tar.xz linux-51a9e1755cdd8b127191030d15b74b97f7d3ce75.zip |
macintosh/windfarm_lm75_sensor: Convert to i2c's .probe_new()
.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20221118224540.619276-295-uwe@kleine-koenig.org
Diffstat (limited to 'drivers/macintosh')
-rw-r--r-- | drivers/macintosh/windfarm_lm75_sensor.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/macintosh/windfarm_lm75_sensor.c b/drivers/macintosh/windfarm_lm75_sensor.c index 204661c8e918..24f0a444d312 100644 --- a/drivers/macintosh/windfarm_lm75_sensor.c +++ b/drivers/macintosh/windfarm_lm75_sensor.c @@ -87,9 +87,9 @@ static const struct wf_sensor_ops wf_lm75_ops = { .owner = THIS_MODULE, }; -static int wf_lm75_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ +static int wf_lm75_probe(struct i2c_client *client) +{ + const struct i2c_device_id *id = i2c_client_get_device_id(client); struct wf_lm75_sensor *lm; int rc, ds1775; const char *name, *loc; @@ -177,7 +177,7 @@ static struct i2c_driver wf_lm75_driver = { .name = "wf_lm75", .of_match_table = wf_lm75_of_id, }, - .probe = wf_lm75_probe, + .probe_new = wf_lm75_probe, .remove = wf_lm75_remove, .id_table = wf_lm75_id, }; |