tpm: tpm_i2c_nuvoton: Convert to i2c's .probe_new()
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 18 Nov 2022 22:35:38 +0000 (23:35 +0100)
committerJarkko Sakkinen <jarkko@kernel.org>
Mon, 13 Feb 2023 08:11:20 +0000 (10:11 +0200)
.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>
Acked-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
drivers/char/tpm/tpm_i2c_nuvoton.c

index 95c37350cc8e5d1e078aa7a3902ac79b7dfcd9da..a026e98add501b98d2398c5c981d4ff7effb3913 100644 (file)
@@ -522,9 +522,9 @@ static int get_vid(struct i2c_client *client, u32 *res)
        return 0;
 }
 
-static int i2c_nuvoton_probe(struct i2c_client *client,
-                            const struct i2c_device_id *id)
+static int i2c_nuvoton_probe(struct i2c_client *client)
 {
+       const struct i2c_device_id *id = i2c_client_get_device_id(client);
        int rc;
        struct tpm_chip *chip;
        struct device *dev = &client->dev;
@@ -650,7 +650,7 @@ static SIMPLE_DEV_PM_OPS(i2c_nuvoton_pm_ops, tpm_pm_suspend, tpm_pm_resume);
 
 static struct i2c_driver i2c_nuvoton_driver = {
        .id_table = i2c_nuvoton_id,
-       .probe = i2c_nuvoton_probe,
+       .probe_new = i2c_nuvoton_probe,
        .remove = i2c_nuvoton_remove,
        .driver = {
                .name = "tpm_i2c_nuvoton",