summaryrefslogtreecommitdiff
path: root/drivers/regulator/max8660.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2022-11-18 23:44:43 +0100
committerMark Brown <broonie@kernel.org>2022-11-23 14:17:43 +0000
commitdbf31dac703009174226bb87b3914bd092040327 (patch)
tree1ff606d103baaa235b8583e1ae3eaac84510bfb6 /drivers/regulator/max8660.c
parent78c8f6cdb51d471928d481ed3b2c82dbc110a1ed (diff)
regulator: max8660: 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> 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-550-uwe@kleine-koenig.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/max8660.c')
-rw-r--r--drivers/regulator/max8660.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/regulator/max8660.c b/drivers/regulator/max8660.c
index 347043a5a9a7..711623be8eb5 100644
--- a/drivers/regulator/max8660.c
+++ b/drivers/regulator/max8660.c
@@ -367,9 +367,9 @@ static inline int max8660_pdata_from_dt(struct device *dev,
}
#endif
-static int max8660_probe(struct i2c_client *client,
- const struct i2c_device_id *i2c_id)
+static int max8660_probe(struct i2c_client *client)
{
+ const struct i2c_device_id *i2c_id = i2c_client_get_device_id(client);
struct device *dev = &client->dev;
struct max8660_platform_data pdata_of, *pdata = dev_get_platdata(dev);
struct regulator_config config = { };
@@ -503,7 +503,7 @@ static const struct i2c_device_id max8660_id[] = {
MODULE_DEVICE_TABLE(i2c, max8660_id);
static struct i2c_driver max8660_driver = {
- .probe = max8660_probe,
+ .probe_new = max8660_probe,
.driver = {
.name = "max8660",
},