* [PATCH] arch/powerpc: use simple i2c probe function
@ 2020-08-07 15:27 ` Stephen Kitt
0 siblings, 0 replies; 6+ messages in thread
From: Stephen Kitt @ 2020-08-07 15:27 UTC (permalink / raw)
To: Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras,
Scott Wood, linuxppc-dev
Cc: linux-i2c, linux-kernel, 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 <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(-)
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,
};
--
2.25.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] arch/powerpc: use simple i2c probe function
@ 2020-08-07 15:27 ` Stephen Kitt
0 siblings, 0 replies; 6+ messages in thread
From: Stephen Kitt @ 2020-08-07 15:27 UTC (permalink / raw)
To: Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras,
Scott Wood, linuxppc-dev
Cc: Stephen Kitt, linux-i2c, linux-kernel
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(-)
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,
};
--
2.25.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] arch/powerpc: use simple i2c probe function
2020-08-07 15:27 ` Stephen Kitt
@ 2020-08-10 9:36 ` Wolfram Sang
-1 siblings, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2020-08-10 9:36 UTC (permalink / raw)
To: Stephen Kitt
Cc: Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras,
Scott Wood, linuxppc-dev, linux-i2c, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 463 bytes --]
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>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arch/powerpc: use simple i2c probe function
@ 2020-08-10 9:36 ` Wolfram Sang
0 siblings, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2020-08-10 9:36 UTC (permalink / raw)
To: Stephen Kitt
Cc: linux-kernel, Scott Wood, Paul Mackerras, linux-i2c, linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 463 bytes --]
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>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arch/powerpc: use simple i2c probe function
2020-08-07 15:27 ` Stephen Kitt
(?)
(?)
@ 2020-08-13 13:14 ` Luca Ceresoli
-1 siblings, 0 replies; 6+ messages in thread
From: Luca Ceresoli @ 2020-08-13 13:14 UTC (permalink / raw)
To: Stephen Kitt, Michael Ellerman, Benjamin Herrenschmidt,
Paul Mackerras, Scott Wood, linuxppc-dev
Cc: linux-i2c, linux-kernel
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>
--
Luca
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arch/powerpc: use simple i2c probe function
2020-08-07 15:27 ` Stephen Kitt
` (2 preceding siblings ...)
(?)
@ 2020-09-09 13:28 ` Michael Ellerman
-1 siblings, 0 replies; 6+ messages in thread
From: Michael Ellerman @ 2020-09-09 13:28 UTC (permalink / raw)
To: linuxppc-dev, Stephen Kitt, Scott Wood, Michael Ellerman,
Benjamin Herrenschmidt, Paul Mackerras
Cc: linux-kernel, linux-i2c
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-09-09 16:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-07 15:27 [PATCH] arch/powerpc: use simple i2c probe function Stephen Kitt
2020-08-07 15:27 ` Stephen Kitt
2020-08-10 9:36 ` Wolfram Sang
2020-08-10 9:36 ` Wolfram Sang
2020-08-13 13:14 ` Luca Ceresoli
2020-09-09 13:28 ` Michael Ellerman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.