2022-04-07 20:14:53

by Stephen Kitt

[permalink] [raw]
Subject: [PATCH v2 06/10] clk: si5341: use simple i2c probe function

The i2c probe function here doesn't use the id information provided in
its 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]>
---
drivers/clk/clk-si5341.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/clk-si5341.c b/drivers/clk/clk-si5341.c
index 41851f41b682..4bca73212662 100644
--- a/drivers/clk/clk-si5341.c
+++ b/drivers/clk/clk-si5341.c
@@ -1547,8 +1547,7 @@ static const struct attribute *si5341_attributes[] = {
NULL
};

-static int si5341_probe(struct i2c_client *client,
- const struct i2c_device_id *id)
+static int si5341_probe(struct i2c_client *client)
{
struct clk_si5341 *data;
struct clk_init_data init;
@@ -1837,7 +1836,7 @@ static struct i2c_driver si5341_driver = {
.name = "si5341",
.of_match_table = clk_si5341_of_match,
},
- .probe = si5341_probe,
+ .probe_new = si5341_probe,
.remove = si5341_remove,
.id_table = si5341_id,
};
--
2.27.0


2022-04-07 21:28:11

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH v2 06/10] clk: si5341: use simple i2c probe function

On Thu, Apr 07, 2022 at 05:18:27PM +0200, Stephen Kitt wrote:
> The i2c probe function here doesn't use the id information provided in
> its 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]>

Reviewed-by: Wolfram Sang <[email protected]>


Attachments:
(No filename) (424.00 B)
signature.asc (849.00 B)
Download all attachments

2022-04-23 03:15:19

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH v2 06/10] clk: si5341: use simple i2c probe function

Quoting Stephen Kitt (2022-04-07 08:18:27)
> The i2c probe function here doesn't use the id information provided in
> its 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]>
> ---

Applied to clk-next