2022-04-07 20:27:15

by Stephen Kitt

[permalink] [raw]
Subject: [PATCH v2 03/10] clk: cs2000-cp: 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-cs2000-cp.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/clk-cs2000-cp.c b/drivers/clk/clk-cs2000-cp.c
index dc5040a84dcc..aa5c72bab83e 100644
--- a/drivers/clk/clk-cs2000-cp.c
+++ b/drivers/clk/clk-cs2000-cp.c
@@ -570,8 +570,7 @@ static int cs2000_remove(struct i2c_client *client)
return 0;
}

-static int cs2000_probe(struct i2c_client *client,
- const struct i2c_device_id *id)
+static int cs2000_probe(struct i2c_client *client)
{
struct cs2000_priv *priv;
struct device *dev = &client->dev;
@@ -625,7 +624,7 @@ static struct i2c_driver cs2000_driver = {
.pm = &cs2000_pm_ops,
.of_match_table = cs2000_of_match,
},
- .probe = cs2000_probe,
+ .probe_new = cs2000_probe,
.remove = cs2000_remove,
.id_table = cs2000_id,
};
--
2.27.0


2022-04-07 21:28:01

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH v2 03/10] clk: cs2000-cp: use simple i2c probe function

On Thu, Apr 07, 2022 at 05:18:24PM +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:48:38

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH v2 03/10] clk: cs2000-cp: use simple i2c probe function

Quoting Stephen Kitt (2022-04-07 08:18:24)
> 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