summaryrefslogtreecommitdiff
path: root/drivers/gpio
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2022-11-18 23:35:46 +0100
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2022-11-24 09:22:00 +0100
commit1287341c1980e0cf9eb19bdd370405d755392f2f (patch)
tree4b278b08de4bcaaea19bccb64440bb0b207fd9d8 /drivers/gpio
parent8ac813f7e663bcf03e09291517359111d0cf9785 (diff)
downloadlwn-1287341c1980e0cf9eb19bdd370405d755392f2f.tar.gz
lwn-1287341c1980e0cf9eb19bdd370405d755392f2f.zip
gpio: pca953x: Convert to i2c's .probe_new()
.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> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-pca953x.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index ebe1943b85dd..342800527c14 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -1049,9 +1049,9 @@ out:
return ret;
}
-static int pca953x_probe(struct i2c_client *client,
- const struct i2c_device_id *i2c_id)
+static int pca953x_probe(struct i2c_client *client)
{
+ const struct i2c_device_id *i2c_id = i2c_client_get_device_id(client);
struct pca953x_platform_data *pdata;
struct pca953x_chip *chip;
int irq_base = 0;
@@ -1375,7 +1375,7 @@ static struct i2c_driver pca953x_driver = {
.of_match_table = pca953x_dt_ids,
.acpi_match_table = pca953x_acpi_ids,
},
- .probe = pca953x_probe,
+ .probe_new = pca953x_probe,
.remove = pca953x_remove,
.id_table = pca953x_id,
};