macintosh/therm_windtunnel: Convert to i2c's .probe_new()
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 18 Nov 2022 22:40:25 +0000 (23:40 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 24 Nov 2022 12:12:16 +0000 (23:12 +1100)
.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
drivers/macintosh/therm_windtunnel.c

index b8228ca404544741fb79c7db1b97146144f79d49..22b15efcc0258af874dd267d68556e4fcca812a7 100644 (file)
@@ -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,
 };