Message ID | 20200807152713.381588-1-steve@sk2.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 6c9100ea39d209e1625ba0fe06134192d9c4752a |
Headers | show |
Series | arch/powerpc: use simple i2c probe function | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch powerpc/merge (3cd2184115b85cc8242fec3d42529cd112962984) |
snowpatch_ozlabs/build-ppc64le | warning | Upstream build failed, couldn't test patch |
snowpatch_ozlabs/build-ppc64be | warning | Upstream build failed, couldn't test patch |
snowpatch_ozlabs/build-ppc64e | warning | Upstream build failed, couldn't test patch |
snowpatch_ozlabs/build-pmac32 | warning | Upstream build failed, couldn't test patch |
snowpatch_ozlabs/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 33 lines checked |
snowpatch_ozlabs/needsstable | success | Patch has no Fixes tags |
On Fri, Aug 07, 2020 at 05:27:13PM +0200, Stephen Kitt wrote: > 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> This is useful, helps deprecating the old probe method: Acked-by: Wolfram Sang <wsa@kernel.org>
Hi, On 07/08/20 17:27, Stephen Kitt wrote: > 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> Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
On Fri, 7 Aug 2020 17:27:13 +0200, Stephen Kitt wrote: > 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. Applied to powerpc/next. [1/1] powerpc: Use simple i2c probe function https://git.kernel.org/powerpc/c/6c9100ea39d209e1625ba0fe06134192d9c4752a cheers
diff --git a/arch/powerpc/platforms/44x/ppc476.c b/arch/powerpc/platforms/44x/ppc476.c index cba83eee685c..07f7e3ce67b5 100644 --- a/arch/powerpc/platforms/44x/ppc476.c +++ b/arch/powerpc/platforms/44x/ppc476.c @@ -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, }; diff --git a/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c b/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c index 0967bdfb1691..409481016928 100644 --- a/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c +++ b/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c @@ -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, };
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> --- arch/powerpc/platforms/44x/ppc476.c | 5 ++--- arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-)