ipmi: use simple i2c probe function
authorStephen Kitt <steve@sk2.org>
Thu, 24 Mar 2022 17:11:59 +0000 (18:11 +0100)
committerCorey Minyard <cminyard@mvista.com>
Thu, 12 May 2022 15:00:03 +0000 (10:00 -0500)
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@sk2.org>
Message-Id: <20220324171159.544565-1-steve@sk2.org>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
drivers/char/ipmi/ipmb_dev_int.c
drivers/char/ipmi/ipmi_ipmb.c
drivers/char/ipmi/ipmi_ssif.c

index 49b8f22fdcf03b8883e378d28e07ce13172df854..db40037eb3470f1fe88f846454a50133183c597f 100644 (file)
@@ -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,
 };
index b81b862532fb01b3b851f69f7d246e3c46a7ad82..7a83fbb4e379b8b64d72659ed7c6fde6054e6864 100644 (file)
@@ -442,8 +442,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;
@@ -570,7 +569,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,
 };
index f199cc19484462ba020adfd820ff4510e791a73f..0aff189425529e9a8ed978fc5d383a1ebe20b4a3 100644 (file)
@@ -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,