summaryrefslogtreecommitdiffstats
path: root/drivers/macintosh
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2022-11-18 23:40:25 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2022-11-24 23:12:16 +1100
commitdc9be0735c3e245fe60775307cf7842b1f9b45a2 (patch)
treebaa1f2aa83d8764e78e3d488352879479e0380d9 /drivers/macintosh
parent0424113fed923a2fcb699b5f3aa335d16e092f3d (diff)
downloadlinux-dc9be0735c3e245fe60775307cf7842b1f9b45a2.tar.bz2
macintosh/therm_windtunnel: 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-292-uwe@kleine-koenig.org
Diffstat (limited to 'drivers/macintosh')
-rw-r--r--drivers/macintosh/therm_windtunnel.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c
index b8228ca40454..22b15efcc025 100644
--- a/drivers/macintosh/therm_windtunnel.c
+++ b/drivers/macintosh/therm_windtunnel.c
@@ -411,8 +411,9 @@ static const struct i2c_device_id therm_windtunnel_id[] = {
MODULE_DEVICE_TABLE(i2c, therm_windtunnel_id);
static int
-do_probe(struct i2c_client *cl, const struct i2c_device_id *id)
+do_probe(struct i2c_client *cl)
{
+ const struct i2c_device_id *id = i2c_client_get_device_id(cl);
struct i2c_adapter *adapter = cl->adapter;
int ret = 0;
@@ -441,7 +442,7 @@ static struct i2c_driver g4fan_driver = {
.driver = {
.name = "therm_windtunnel",
},
- .probe = do_probe,
+ .probe_new = do_probe,
.remove = do_remove,
.id_table = therm_windtunnel_id,
};