powerpc: Use simple i2c probe function
authorStephen Kitt <steve@sk2.org>
Fri, 7 Aug 2020 15:27:13 +0000 (17:27 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 2 Sep 2020 01:00:20 +0000 (11:00 +1000)
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>
Acked-by: Wolfram Sang <wsa@kernel.org>
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200807152713.381588-1-steve@sk2.org
arch/powerpc/platforms/44x/ppc476.c
arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c

index cba83eee685c51310a5fe79bd1cbe83f87a7890a..07f7e3ce67b5f15eab4411cb76a19fb752f44c87 100644 (file)
@@ -86,8 +86,7 @@ static void __noreturn avr_reset_system(char *cmd)
        avr_halt_system(AVR_PWRCTL_RESET);
 }
 
-static int avr_probe(struct i2c_client *client,
-                           const struct i2c_device_id *id)
+static int avr_probe(struct i2c_client *client)
 {
        avr_i2c_client = client;
        ppc_md.restart = avr_reset_system;
@@ -104,7 +103,7 @@ static struct i2c_driver avr_driver = {
        .driver = {
                .name = "akebono-avr",
        },
-       .probe = avr_probe,
+       .probe_new = avr_probe,
        .id_table = avr_id,
 };
 
index 0967bdfb16911f315c1bb5a1a4f05dbacb367ad8..409481016928f5b3838bb4d001a55e738e5a5f8e 100644 (file)
@@ -142,7 +142,7 @@ static int mcu_gpiochip_remove(struct mcu *mcu)
        return 0;
 }
 
-static int mcu_probe(struct i2c_client *client, const struct i2c_device_id *id)
+static int mcu_probe(struct i2c_client *client)
 {
        struct mcu *mcu;
        int ret;
@@ -221,7 +221,7 @@ static struct i2c_driver mcu_driver = {
                .name = "mcu-mpc8349emitx",
                .of_match_table = mcu_of_match_table,
        },
-       .probe = mcu_probe,
+       .probe_new = mcu_probe,
        .remove = mcu_remove,
        .id_table = mcu_ids,
 };