regulator: ad5398: Convert to i2c's .probe_new()
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 18 Nov 2022 22:44:33 +0000 (23:44 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 23 Nov 2022 14:17:40 +0000 (14:17 +0000)
.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: Michael Hennerich <michael.hennerich@analog.com>
Acked-for-MFD-by: Lee Jones <lee@kernel.org>
Acked-for-Backlight-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221118224540.619276-540-uwe@kleine-koenig.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/ad5398.c

index 75f432f61e91969bb6845313dca1db01f9795395..2ba8ac1773d1b79dca56fdf4e05a345a80943870 100644 (file)
@@ -212,9 +212,9 @@ static const struct i2c_device_id ad5398_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, ad5398_id);
 
-static int ad5398_probe(struct i2c_client *client,
-                               const struct i2c_device_id *id)
+static int ad5398_probe(struct i2c_client *client)
 {
+       const struct i2c_device_id *id = i2c_client_get_device_id(client);
        struct regulator_init_data *init_data = dev_get_platdata(&client->dev);
        struct regulator_config config = { };
        struct ad5398_chip_info *chip;
@@ -254,7 +254,7 @@ static int ad5398_probe(struct i2c_client *client,
 }
 
 static struct i2c_driver ad5398_driver = {
-       .probe = ad5398_probe,
+       .probe_new = ad5398_probe,
        .driver         = {
                .name   = "ad5398",
        },