ARM: davinci: use simple i2c probe function
Subsystems (4)
PATCH v2 1/1 ARM: davinci: 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.
---
Changes since v1:
- split into per-sub-architecture patches.
arch/arm/mach-davinci/board-dm644x-evm.c | 5 ++--- arch/arm/mach-davinci/board-dm646x-evm.c | 10 ++++------ 2 files changed, 6 insertions(+), 9 deletions(-)
arch/arm/mach-davinci/board-dm644x-evm.c +2 -3
@@ -548,8 +548,7 @@ static const struct property_entry eeprom_properties[] = {*/ static struct i2c_client *dm6446evm_msp; -static int dm6446evm_msp_probe (struct i2c_client *client, -const struct i2c_device_id *id) +static int dm6446evm_msp_probe (struct i2c_client *client) { dm6446evm_msp = client;return 0 ;
@@ -569,7 +568,7 @@ static const struct i2c_device_id dm6446evm_msp_ids[] = {static struct i2c_driver dm6446evm_msp_driver = { .driver.name ="dm6446evm_msp" , .id_table = dm6446evm_msp_ids, - .probe = dm6446evm_msp_probe, + .probe_new = dm6446evm_msp_probe, .remove = dm6446evm_msp_remove, };
arch/arm/mach-davinci/board-dm646x-evm.c +4 -6
@@ -160,8 +160,7 @@ static struct platform_device davinci_aemif_device = {#define DM646X_EVM_ATA_PWD BIT(1)/* CPLD Register 0 Client: used for I/O Control */ -static int cpld_reg0_probe (struct i2c_client *client, -const struct i2c_device_id *id) +static int cpld_reg0_probe (struct i2c_client *client) {if (HAS_ATA ) {u8 data;
@@ -197,7 +196,7 @@ static const struct i2c_device_id cpld_reg_ids[] = {static struct i2c_driver dm6467evm_cpld_driver = { .driver.name ="cpld_reg0" , .id_table = cpld_reg_ids, - .probe = cpld_reg0_probe, + .probe_new = cpld_reg0_probe, };/* LEDS */
@@ -402,8 +401,7 @@ static struct snd_platform_data dm646x_evm_snd_data[] = {#ifdef CONFIG_I2C static struct i2c_client *cpld_client; -static int cpld_video_probe (struct i2c_client *client, -const struct i2c_device_id *id) +static int cpld_video_probe (struct i2c_client *client) { cpld_client = client;return 0 ;
@@ -424,7 +422,7 @@ static struct i2c_driver cpld_video_driver = { .driver = { .name = "cpld_video", }, - .probe = cpld_video_probe, + .probe_new = cpld_video_probe, .remove = cpld_video_remove, .id_table = cpld_video_id, };
base-commit: bcf876870b95592b52519ed4aafcf9d95999bc9c
Signature · 7 lines
2.20.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 7 lines · Stephen Kitt
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 <[email protected]>
This is useful, helps deprecating the old probe method:
Quoted 5 lines · Wolfram Sang
Quoted 4 lines · Stephen Kitt
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.
Quoted 7 lines
Quoted 3 lines
This avoids scanning the identifier tables during probes.
Signed-off-by Stephen Kitt <[email protected]>This is useful, helps deprecating the old probe method:
Acked-by Wolfram Sang <[email protected]>
Queued for v5.10.
Thanks,
Sekhar
Quoted 82 lines · Stephen Kitt
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 <[email protected]>---
Changes since v1:
- split into per-sub-architecture patches.arch/arm/mach-davinci/board-dm644x-evm.c | 5 ++--- arch/arm/mach-davinci/board-dm646x-evm.c | 10 ++++------ 2 files changed, 6 insertions(+), 9 deletions(-)arch/arm/mach-davinci/board-dm644x-evm.c +2
-3@@ -548,8 +548,7 @@ static const struct property_entry eeprom_properties[] = {*/ static struct i2c_client *dm6446evm_msp; -static int dm6446evm_msp_probe (struct i2c_client *client, -const struct i2c_device_id *id) +static int dm6446evm_msp_probe (struct i2c_client *client) { dm6446evm_msp = client;return 0 ;@@ -569,7 +568,7 @@ static const struct i2c_device_id dm6446evm_msp_ids[] = {static struct i2c_driver dm6446evm_msp_driver = { .driver.name ="dm6446evm_msp" , .id_table = dm6446evm_msp_ids, - .probe = dm6446evm_msp_probe, + .probe_new = dm6446evm_msp_probe, .remove = dm6446evm_msp_remove, };arch/arm/mach-davinci/board-dm646x-evm.c +4
-6@@ -160,8 +160,7 @@ static struct platform_device davinci_aemif_device = {#define DM646X_EVM_ATA_PWD BIT(1)/* CPLD Register 0 Client: used for I/O Control */ -static int cpld_reg0_probe (struct i2c_client *client, -const struct i2c_device_id *id) +static int cpld_reg0_probe (struct i2c_client *client) {if (HAS_ATA ) {u8 data;@@ -197,7 +196,7 @@ static const struct i2c_device_id cpld_reg_ids[] = {static struct i2c_driver dm6467evm_cpld_driver = { .driver.name ="cpld_reg0" , .id_table = cpld_reg_ids, - .probe = cpld_reg0_probe, + .probe_new = cpld_reg0_probe, };/* LEDS */ @@ -402,8 +401,7 @@ static struct snd_platform_data dm646x_evm_snd_data[] = {#ifdef CONFIG_I2C static struct i2c_client *cpld_client; -static int cpld_video_probe (struct i2c_client *client, -const struct i2c_device_id *id) +static int cpld_video_probe (struct i2c_client *client) { cpld_client = client;return 0 ;@@ -424,7 +422,7 @@ static struct i2c_driver cpld_video_driver = { .driver = { .name = "cpld_video", }, - .probe = cpld_video_probe, + .probe_new = cpld_video_probe, .remove = cpld_video_remove, .id_table = cpld_video_id, };
Quoted 4 lines
base-commit:
bcf876870b95592b52519ed4aafcf9d95999bc9c--
2.20.1
Hi,
Quoted 7 lines · Stephen Kitt
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 <[email protected]>
Signature · 1 line
Luca