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

index 8156bb2af78cffa998bbcee091d7c10c68a40ba0..c4d0b744e3cc7379b6af00af991df869a88c00a4 100644 (file)
@@ -101,8 +101,7 @@ static const struct st33zp24_phy_ops i2c_phy_ops = {
  * @return: 0 in case of success.
  *      -1 in other case.
  */
-static int st33zp24_i2c_probe(struct i2c_client *client,
-                             const struct i2c_device_id *id)
+static int st33zp24_i2c_probe(struct i2c_client *client)
 {
        struct st33zp24_i2c_phy *phy;
 
@@ -161,7 +160,7 @@ static struct i2c_driver st33zp24_i2c_driver = {
                .of_match_table = of_match_ptr(of_st33zp24_i2c_match),
                .acpi_match_table = ACPI_PTR(st33zp24_i2c_acpi_match),
        },
-       .probe = st33zp24_i2c_probe,
+       .probe_new = st33zp24_i2c_probe,
        .remove = st33zp24_i2c_remove,
        .id_table = st33zp24_i2c_id
 };