Skip to content

Commit

Permalink
i2c: Convert drivers to new .probe() callback
Browse files Browse the repository at this point in the history
Now that .probe() was changed not to get the id parameter, drivers can
be converted back to that with the eventual goal to drop .probe_new().

Implement that for the i2c drivers that are part of the i2c core.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
  • Loading branch information
Uwe Kleine-König authored and Wolfram Sang committed Mar 9, 2023
1 parent 2f2afad commit 834a9dc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion drivers/i2c/i2c-core-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,7 @@ static int dummy_probe(struct i2c_client *client)

static struct i2c_driver dummy_driver = {
.driver.name = "dummy",
.probe_new = dummy_probe,
.probe = dummy_probe,
.id_table = dummy_id,
};

Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c-slave-eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static struct i2c_driver i2c_slave_eeprom_driver = {
.driver = {
.name = "i2c-slave-eeprom",
},
.probe_new = i2c_slave_eeprom_probe,
.probe = i2c_slave_eeprom_probe,
.remove = i2c_slave_eeprom_remove,
.id_table = i2c_slave_eeprom_id,
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c-slave-testunit.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ static struct i2c_driver i2c_slave_testunit_driver = {
.driver = {
.name = "i2c-slave-testunit",
},
.probe_new = i2c_slave_testunit_probe,
.probe = i2c_slave_testunit_probe,
.remove = i2c_slave_testunit_remove,
.id_table = i2c_slave_testunit_id,
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c-smbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ static struct i2c_driver smbalert_driver = {
.driver = {
.name = "smbus_alert",
},
.probe_new = smbalert_probe,
.probe = smbalert_probe,
.remove = smbalert_remove,
.id_table = smbalert_ids,
};
Expand Down

0 comments on commit 834a9dc

Please sign in to comment.