ipmi: use simple i2c probe function
PATCH 1/1 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.
--- drivers/char/ipmi/ipmb_dev_int.c | 5 ++--- drivers/char/ipmi/ipmi_ipmb.c | 5 ++--- drivers/char/ipmi/ipmi_ssif.c | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-)
drivers/char/ipmi/ipmb_dev_int.c +2 -3
@@ -299,8 +299,7 @@ static int ipmb_slave_cb(struct i2c_client *client,return 0 ; } -static int ipmb_probe (struct i2c_client *client, -const struct i2c_device_id *id) +static int ipmb_probe (struct i2c_client *client) {struct ipmb_dev *ipmb_dev;int ret;
@@ -369,7 +368,7 @@ static struct i2c_driver ipmb_driver = { .name = "ipmb-dev", .acpi_match_table = ACPI_PTR(acpi_ipmb_id), }, - .probe = ipmb_probe, + .probe_new = ipmb_probe, .remove = ipmb_remove, .id_table = ipmb_id, };
drivers/char/ipmi/ipmi_ipmb.c +2 -3
@@ -436,8 +436,7 @@ static int ipmi_ipmb_remove(struct i2c_client *client)return 0 ; } -static int ipmi_ipmb_probe (struct i2c_client *client, -const struct i2c_device_id *id) +static int ipmi_ipmb_probe (struct i2c_client *client) {struct device *dev = &client->dev;struct ipmi_ipmb_dev *iidev;
@@ -528,7 +527,7 @@ static struct i2c_driver ipmi_ipmb_driver = { .name = DEVICE_NAME, .of_match_table = of_ipmi_ipmb_match, }, - .probe = ipmi_ipmb_probe, + .probe_new = ipmi_ipmb_probe, .remove = ipmi_ipmb_remove, .id_table = ipmi_ipmb_id, };
drivers/char/ipmi/ipmi_ssif.c +2 -2
@@ -1619,7 +1619,7 @@ static int ssif_check_and_remove(struct i2c_client *client,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 *resp;
@@ -2037,7 +2037,7 @@ static struct i2c_driver ssif_i2c_driver = { .driver = { .name =DEVICE_NAME }, - .probe = ssif_probe, + .probe_new = ssif_probe, .remove = ssif_remove, .alert = ssif_alert, .id_table = ssif_id,
Signature · 1 line
2.27.0
Quoted 7 lines · Stephen Kitt
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 Stephen Kitt <[email protected]>
Looks good and builds fine:
Quoted 5 lines · Wolfram Sang
Quoted 4 lines · Stephen Kitt
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.
Quoted 8 lines
Quoted 3 lines
This avoids scanning the identifier tables during probes.
Signed-off-by Stephen Kitt <[email protected]>Looks good and builds fine:
Reviewed-by Wolfram Sang <[email protected]>
Thanks, I have this queued and I've added the review.
I'm just waiting for the merge window to close before I put it into the next tree.
-corey