提交 99b0cb3f 编写于 作者: U Uwe Kleine-König 提交者: Greg Kroah-Hartman

misc: eeprom/max6875: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.
Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20221118224540.619276-490-uwe@kleine-koenig.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 327e1ad1
...@@ -130,8 +130,7 @@ static const struct bin_attribute user_eeprom_attr = { ...@@ -130,8 +130,7 @@ static const struct bin_attribute user_eeprom_attr = {
.read = max6875_read, .read = max6875_read,
}; };
static int max6875_probe(struct i2c_client *client, static int max6875_probe(struct i2c_client *client)
const struct i2c_device_id *id)
{ {
struct i2c_adapter *adapter = client->adapter; struct i2c_adapter *adapter = client->adapter;
struct max6875_data *data; struct max6875_data *data;
...@@ -193,7 +192,7 @@ static struct i2c_driver max6875_driver = { ...@@ -193,7 +192,7 @@ static struct i2c_driver max6875_driver = {
.driver = { .driver = {
.name = "max6875", .name = "max6875",
}, },
.probe = max6875_probe, .probe_new = max6875_probe,
.remove = max6875_remove, .remove = max6875_remove,
.id_table = max6875_id, .id_table = max6875_id,
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册