Commit e2c6678b authored by Jisheng Zhang's avatar Jisheng Zhang Committed by Mark Brown

regulator: mp886x: use .probe_new

Use the new .probe_new for mp886x. It does not use the const
struct i2c_device_id * argument, so convert it to utilise the
simplified i2c driver registration.
Signed-off-by: default avatarJisheng Zhang <Jisheng.Zhang@synaptics.com>
Link: https://lore.kernel.org/r/20200702100200.1a4c65d1@xhacker.debianSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 94462138
...@@ -206,8 +206,7 @@ static const struct regmap_config mp886x_regmap_config = { ...@@ -206,8 +206,7 @@ static const struct regmap_config mp886x_regmap_config = {
.val_bits = 8, .val_bits = 8,
}; };
static int mp886x_i2c_probe(struct i2c_client *client, static int mp886x_i2c_probe(struct i2c_client *client)
const struct i2c_device_id *id)
{ {
struct device *dev = &client->dev; struct device *dev = &client->dev;
struct device_node *np = dev->of_node; struct device_node *np = dev->of_node;
...@@ -280,7 +279,7 @@ static struct i2c_driver mp886x_regulator_driver = { ...@@ -280,7 +279,7 @@ static struct i2c_driver mp886x_regulator_driver = {
.name = "mp886x-regulator", .name = "mp886x-regulator",
.of_match_table = of_match_ptr(mp886x_dt_ids), .of_match_table = of_match_ptr(mp886x_dt_ids),
}, },
.probe = mp886x_i2c_probe, .probe_new = mp886x_i2c_probe,
.id_table = mp886x_id, .id_table = mp886x_id,
}; };
module_i2c_driver(mp886x_regulator_driver); module_i2c_driver(mp886x_regulator_driver);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment