Commit 0924c5a0 authored by Stephen Kitt's avatar Stephen Kitt Committed by Corey Minyard

ipmi: use simple i2c probe function

The i2c probe functions here don't use the id information provided in
their second argument, so the single-parameter i2c probe function
("probe_new") can be used instead.

This avoids scanning the identifier tables during probes.
Signed-off-by: default avatarStephen Kitt <steve@sk2.org>
Message-Id: <20220324171159.544565-1-steve@sk2.org>
Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
Reviewed-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
parent d5d91586
...@@ -299,8 +299,7 @@ static int ipmb_slave_cb(struct i2c_client *client, ...@@ -299,8 +299,7 @@ static int ipmb_slave_cb(struct i2c_client *client,
return 0; return 0;
} }
static int ipmb_probe(struct i2c_client *client, static int ipmb_probe(struct i2c_client *client)
const struct i2c_device_id *id)
{ {
struct ipmb_dev *ipmb_dev; struct ipmb_dev *ipmb_dev;
int ret; int ret;
...@@ -369,7 +368,7 @@ static struct i2c_driver ipmb_driver = { ...@@ -369,7 +368,7 @@ static struct i2c_driver ipmb_driver = {
.name = "ipmb-dev", .name = "ipmb-dev",
.acpi_match_table = ACPI_PTR(acpi_ipmb_id), .acpi_match_table = ACPI_PTR(acpi_ipmb_id),
}, },
.probe = ipmb_probe, .probe_new = ipmb_probe,
.remove = ipmb_remove, .remove = ipmb_remove,
.id_table = ipmb_id, .id_table = ipmb_id,
}; };
......
...@@ -442,8 +442,7 @@ static int ipmi_ipmb_remove(struct i2c_client *client) ...@@ -442,8 +442,7 @@ static int ipmi_ipmb_remove(struct i2c_client *client)
return 0; return 0;
} }
static int ipmi_ipmb_probe(struct i2c_client *client, static int ipmi_ipmb_probe(struct i2c_client *client)
const struct i2c_device_id *id)
{ {
struct device *dev = &client->dev; struct device *dev = &client->dev;
struct ipmi_ipmb_dev *iidev; struct ipmi_ipmb_dev *iidev;
...@@ -570,7 +569,7 @@ static struct i2c_driver ipmi_ipmb_driver = { ...@@ -570,7 +569,7 @@ static struct i2c_driver ipmi_ipmb_driver = {
.name = DEVICE_NAME, .name = DEVICE_NAME,
.of_match_table = of_ipmi_ipmb_match, .of_match_table = of_ipmi_ipmb_match,
}, },
.probe = ipmi_ipmb_probe, .probe_new = ipmi_ipmb_probe,
.remove = ipmi_ipmb_remove, .remove = ipmi_ipmb_remove,
.id_table = ipmi_ipmb_id, .id_table = ipmi_ipmb_id,
}; };
......
...@@ -1619,7 +1619,7 @@ static int ssif_check_and_remove(struct i2c_client *client, ...@@ -1619,7 +1619,7 @@ static int ssif_check_and_remove(struct i2c_client *client,
return 0; return 0;
} }
static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id) static int ssif_probe(struct i2c_client *client)
{ {
unsigned char msg[3]; unsigned char msg[3];
unsigned char *resp; unsigned char *resp;
...@@ -2037,7 +2037,7 @@ static struct i2c_driver ssif_i2c_driver = { ...@@ -2037,7 +2037,7 @@ static struct i2c_driver ssif_i2c_driver = {
.driver = { .driver = {
.name = DEVICE_NAME .name = DEVICE_NAME
}, },
.probe = ssif_probe, .probe_new = ssif_probe,
.remove = ssif_remove, .remove = ssif_remove,
.alert = ssif_alert, .alert = ssif_alert,
.id_table = ssif_id, .id_table = ssif_id,
......
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