提交 f56f316d 编写于 作者: P Peter Rosin

i2c: mux: ltc4306: switch to using .probe_new

Use the new probe style for i2c drivers.
Acked-by: NMichael Hennerich <michael.hennerich@analog.com>
Signed-off-by: NPeter Rosin <peda@axentia.se>
上级 67b8d5c7
...@@ -206,8 +206,7 @@ static const struct of_device_id ltc4306_of_match[] = { ...@@ -206,8 +206,7 @@ static const struct of_device_id ltc4306_of_match[] = {
}; };
MODULE_DEVICE_TABLE(of, ltc4306_of_match); MODULE_DEVICE_TABLE(of, ltc4306_of_match);
static int ltc4306_probe(struct i2c_client *client, static int ltc4306_probe(struct i2c_client *client)
const struct i2c_device_id *id)
{ {
struct i2c_adapter *adap = to_i2c_adapter(client->dev.parent); struct i2c_adapter *adap = to_i2c_adapter(client->dev.parent);
const struct chip_desc *chip; const struct chip_desc *chip;
...@@ -221,7 +220,7 @@ static int ltc4306_probe(struct i2c_client *client, ...@@ -221,7 +220,7 @@ static int ltc4306_probe(struct i2c_client *client,
chip = of_device_get_match_data(&client->dev); chip = of_device_get_match_data(&client->dev);
if (!chip) if (!chip)
chip = &chips[id->driver_data]; chip = &chips[i2c_match_id(ltc4306_id, client)->driver_data];
idle_disc = device_property_read_bool(&client->dev, idle_disc = device_property_read_bool(&client->dev,
"i2c-mux-idle-disconnect"); "i2c-mux-idle-disconnect");
...@@ -310,7 +309,7 @@ static struct i2c_driver ltc4306_driver = { ...@@ -310,7 +309,7 @@ static struct i2c_driver ltc4306_driver = {
.name = "ltc4306", .name = "ltc4306",
.of_match_table = of_match_ptr(ltc4306_of_match), .of_match_table = of_match_ptr(ltc4306_of_match),
}, },
.probe = ltc4306_probe, .probe_new = ltc4306_probe,
.remove = ltc4306_remove, .remove = ltc4306_remove,
.id_table = ltc4306_id, .id_table = ltc4306_id,
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册