[SRU][F:linux-bluefield][PATCH v2 2/2] ipmi: use simple i2c probe function
Asmaa Mnebhi
asmaa at nvidia.com
Tue Jul 5 14:37:15 UTC 2022
From: Stephen Kitt <steve at sk2.org>
BugLink: https://bugs.launchpad.net/bugs/1980525
This change is backported from the mainline:
commit 0924c5a0cbed5831a2a0ff2f9a19692265f1ab92
Author: Stephen Kitt <steve at sk2.org>
Date: Thu Mar 24 18:11:59 2022 +0100
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: Stephen Kitt <steve at sk2.org>
Message-Id: <20220324171159.544565-1-steve at sk2.org>
Signed-off-by: Corey Minyard <cminyard at mvista.com>
Reviewed-by: Wolfram Sang <wsa+renesas at sang-engineering.com>
The above commit makes modifications to 3 files:
ipmb_dev_int.c, ipmi_ipmb.c and ipmi_ssif.c
We can't cherry-pick it because ipmi_ipmb.c doesn't exist on 5.4.
So just backport the change in ipmb_dev_int.c
Signed-off-by: Stephen Kitt <steve at sk2.org>
Message-Id: <20220324171159.544565-1-steve at sk2.org>
Signed-off-by: Corey Minyard <cminyard at mvista.com>
Reviewed-by: Wolfram Sang <wsa+renesas at sang-engineering.com>
(backported from commit 0924c5a0cbed5831a2a0ff2f9a19692265f1ab92)
Signed-off-by: Asmaa Mnebhi <asmaa at nvidia.com>
---
drivers/char/ipmi/ipmb_dev_int.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/char/ipmi/ipmb_dev_int.c b/drivers/char/ipmi/ipmb_dev_int.c
index 49b8f22fdcf0..db40037eb347 100644
--- a/drivers/char/ipmi/ipmb_dev_int.c
+++ b/drivers/char/ipmi/ipmb_dev_int.c
@@ -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,
};
--
2.30.1
More information about the kernel-team
mailing list