未验证 提交 dbf31dac 编写于 作者: U Uwe Kleine-König 提交者: Mark Brown

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: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-for-MFD-by: NLee Jones <lee@kernel.org>
Acked-for-Backlight-by: NLee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221118224540.619276-550-uwe@kleine-koenig.orgSigned-off-by: NMark Brown <broonie@kernel.org>
上级 78c8f6cd
...@@ -367,9 +367,9 @@ static inline int max8660_pdata_from_dt(struct device *dev, ...@@ -367,9 +367,9 @@ static inline int max8660_pdata_from_dt(struct device *dev,
} }
#endif #endif
static int max8660_probe(struct i2c_client *client, static int max8660_probe(struct i2c_client *client)
const struct i2c_device_id *i2c_id)
{ {
const struct i2c_device_id *i2c_id = i2c_client_get_device_id(client);
struct device *dev = &client->dev; struct device *dev = &client->dev;
struct max8660_platform_data pdata_of, *pdata = dev_get_platdata(dev); struct max8660_platform_data pdata_of, *pdata = dev_get_platdata(dev);
struct regulator_config config = { }; struct regulator_config config = { };
...@@ -503,7 +503,7 @@ static const struct i2c_device_id max8660_id[] = { ...@@ -503,7 +503,7 @@ static const struct i2c_device_id max8660_id[] = {
MODULE_DEVICE_TABLE(i2c, max8660_id); MODULE_DEVICE_TABLE(i2c, max8660_id);
static struct i2c_driver max8660_driver = { static struct i2c_driver max8660_driver = {
.probe = max8660_probe, .probe_new = max8660_probe,
.driver = { .driver = {
.name = "max8660", .name = "max8660",
}, },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册