linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ARM: s3c64xx: use simple i2c probe function
@ 2020-08-09 17:22 Stephen Kitt
  2020-08-10  9:36 ` Wolfram Sang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stephen Kitt @ 2020-08-09 17:22 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Russell King, patches,
	linux-arm-kernel, linux-samsung-soc
  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>
---
Changes since v1:
  - split into per-sub-architecture patches.

 arch/arm/mach-s3c64xx/mach-crag6410-module.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-s3c64xx/mach-crag6410-module.c b/arch/arm/mach-s3c64xx/mach-crag6410-module.c
index 34f1baa10c54..43b587e79d21 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410-module.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410-module.c
@@ -378,8 +378,7 @@ static const struct {
 	  .i2c_devs = wm2200_i2c, .num_i2c_devs = ARRAY_SIZE(wm2200_i2c) },
 };
 
-static int wlf_gf_module_probe(struct i2c_client *i2c,
-			       const struct i2c_device_id *i2c_id)
+static int wlf_gf_module_probe(struct i2c_client *i2c)
 {
 	int ret, i, j, id, rev;
 
@@ -432,7 +431,7 @@ static struct i2c_driver wlf_gf_module_driver = {
 	.driver = {
 		.name = "wlf-gf-module"
 	},
-	.probe = wlf_gf_module_probe,
+	.probe_new = wlf_gf_module_probe,
 	.id_table = wlf_gf_module_id,
 };
 

base-commit: bcf876870b95592b52519ed4aafcf9d95999bc9c
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] ARM: s3c64xx: use simple i2c probe function
  2020-08-09 17:22 [PATCH v2] ARM: s3c64xx: use simple i2c probe function Stephen Kitt
@ 2020-08-10  9:36 ` Wolfram Sang
  2020-08-13 13:13 ` Luca Ceresoli
  2020-08-17 15:53 ` Krzysztof Kozlowski
  2 siblings, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2020-08-10  9:36 UTC (permalink / raw)
  To: Stephen Kitt
  Cc: Kukjin Kim, Krzysztof Kozlowski, Russell King, patches,
	linux-arm-kernel, linux-samsung-soc, linux-i2c, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 463 bytes --]

On Sun, Aug 09, 2020 at 07:22:43PM +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] 4+ messages in thread

* Re: [PATCH v2] ARM: s3c64xx: use simple i2c probe function
  2020-08-09 17:22 [PATCH v2] ARM: s3c64xx: use simple i2c probe function Stephen Kitt
  2020-08-10  9:36 ` Wolfram Sang
@ 2020-08-13 13:13 ` Luca Ceresoli
  2020-08-17 15:53 ` Krzysztof Kozlowski
  2 siblings, 0 replies; 4+ messages in thread
From: Luca Ceresoli @ 2020-08-13 13:13 UTC (permalink / raw)
  To: Stephen Kitt, Kukjin Kim, Krzysztof Kozlowski, Russell King,
	patches, linux-arm-kernel, linux-samsung-soc
  Cc: linux-i2c, linux-kernel

Hi,

On 09/08/20 19:22, 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] 4+ messages in thread

* Re: [PATCH v2] ARM: s3c64xx: use simple i2c probe function
  2020-08-09 17:22 [PATCH v2] ARM: s3c64xx: use simple i2c probe function Stephen Kitt
  2020-08-10  9:36 ` Wolfram Sang
  2020-08-13 13:13 ` Luca Ceresoli
@ 2020-08-17 15:53 ` Krzysztof Kozlowski
  2 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2020-08-17 15:53 UTC (permalink / raw)
  To: Stephen Kitt
  Cc: Kukjin Kim, Russell King, patches, linux-arm-kernel,
	linux-samsung-soc, linux-i2c, linux-kernel

On Sun, Aug 09, 2020 at 07:22:43PM +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>
> ---
> Changes since v1:
>   - split into per-sub-architecture patches.
> 
>  arch/arm/mach-s3c64xx/mach-crag6410-module.c | 5 ++---

Thanks, applied.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-08-17 18:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-09 17:22 [PATCH v2] ARM: s3c64xx: use simple i2c probe function Stephen Kitt
2020-08-10  9:36 ` Wolfram Sang
2020-08-13 13:13 ` Luca Ceresoli
2020-08-17 15:53 ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).