Input: elan_i2c_core - Convert to i2c's .probe_new()
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 18 Nov 2022 22:39:15 +0000 (23:39 +0100)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 2 Dec 2022 22:53:43 +0000 (14:53 -0800)
The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20221118224540.619276-222-uwe@kleine-koenig.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/mouse/elan_i2c_core.c

index 1f1f895a2eace13c1c1f6e020d924a847d98506b..76729ada158232823f56a0e0fbf38d1f03c0433b 100644 (file)
@@ -1187,8 +1187,7 @@ static void elan_disable_regulator(void *_data)
        regulator_disable(data->vcc);
 }
 
-static int elan_probe(struct i2c_client *client,
-                     const struct i2c_device_id *dev_id)
+static int elan_probe(struct i2c_client *client)
 {
        const struct elan_transport_ops *transport_ops;
        struct device *dev = &client->dev;
@@ -1425,7 +1424,7 @@ static struct i2c_driver elan_driver = {
                .probe_type = PROBE_PREFER_ASYNCHRONOUS,
                .dev_groups = elan_sysfs_groups,
        },
-       .probe          = elan_probe,
+       .probe_new      = elan_probe,
        .id_table       = elan_id,
 };