提交 6c9100ea 编写于 作者: S Stephen Kitt 提交者: Michael Ellerman

powerpc: 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: NStephen Kitt <steve@sk2.org>
Acked-by: NWolfram Sang <wsa@kernel.org>
Reviewed-by: NLuca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200807152713.381588-1-steve@sk2.org
上级 5d1bc776
...@@ -86,8 +86,7 @@ static void __noreturn avr_reset_system(char *cmd) ...@@ -86,8 +86,7 @@ static void __noreturn avr_reset_system(char *cmd)
avr_halt_system(AVR_PWRCTL_RESET); avr_halt_system(AVR_PWRCTL_RESET);
} }
static int avr_probe(struct i2c_client *client, static int avr_probe(struct i2c_client *client)
const struct i2c_device_id *id)
{ {
avr_i2c_client = client; avr_i2c_client = client;
ppc_md.restart = avr_reset_system; ppc_md.restart = avr_reset_system;
...@@ -104,7 +103,7 @@ static struct i2c_driver avr_driver = { ...@@ -104,7 +103,7 @@ static struct i2c_driver avr_driver = {
.driver = { .driver = {
.name = "akebono-avr", .name = "akebono-avr",
}, },
.probe = avr_probe, .probe_new = avr_probe,
.id_table = avr_id, .id_table = avr_id,
}; };
......
...@@ -142,7 +142,7 @@ static int mcu_gpiochip_remove(struct mcu *mcu) ...@@ -142,7 +142,7 @@ static int mcu_gpiochip_remove(struct mcu *mcu)
return 0; 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; struct mcu *mcu;
int ret; int ret;
...@@ -221,7 +221,7 @@ static struct i2c_driver mcu_driver = { ...@@ -221,7 +221,7 @@ static struct i2c_driver mcu_driver = {
.name = "mcu-mpc8349emitx", .name = "mcu-mpc8349emitx",
.of_match_table = mcu_of_match_table, .of_match_table = mcu_of_match_table,
}, },
.probe = mcu_probe, .probe_new = mcu_probe,
.remove = mcu_remove, .remove = mcu_remove,
.id_table = mcu_ids, .id_table = mcu_ids,
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册