usb: typec: ucsi: stm32g0: Convert to i2c's .probe_new()
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 18 Nov 2022 22:45:18 +0000 (23:45 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Nov 2022 16:33:26 +0000 (17:33 +0100)
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: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-585-uwe@kleine-koenig.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/ucsi/ucsi_stm32g0.c

index 7b92f0c8de7088aa5f9ab81d6abf5a4c3fd78e2c..93fead0096b7bc10caf7f21cca95bd505579ebc6 100644 (file)
@@ -626,7 +626,7 @@ static int ucsi_stm32g0_probe_bootloader(struct ucsi *ucsi)
        return 0;
 }
 
-static int ucsi_stm32g0_probe(struct i2c_client *client, const struct i2c_device_id *id)
+static int ucsi_stm32g0_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct ucsi_stm32g0 *g0;
@@ -763,7 +763,7 @@ static struct i2c_driver ucsi_stm32g0_i2c_driver = {
                .of_match_table = of_match_ptr(ucsi_stm32g0_typec_of_match),
                .pm = pm_sleep_ptr(&ucsi_stm32g0_pm_ops),
        },
-       .probe = ucsi_stm32g0_probe,
+       .probe_new = ucsi_stm32g0_probe,
        .remove = ucsi_stm32g0_remove,
        .id_table = ucsi_stm32g0_typec_i2c_devid
 };