2022-11-19 01:16:22

by Uwe Kleine-König

[permalink] [raw]
Subject: [PATCH 304/606] media: dvb-frontends/dvb-pll: Convert to i2c's .probe_new()

From: Uwe Kleine-König <[email protected]>

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <[email protected]>
---
drivers/media/dvb-frontends/dvb-pll.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/media/dvb-frontends/dvb-pll.c b/drivers/media/dvb-frontends/dvb-pll.c
index baf2a378e565..e35e00db7dbb 100644
--- a/drivers/media/dvb-frontends/dvb-pll.c
+++ b/drivers/media/dvb-frontends/dvb-pll.c
@@ -870,8 +870,9 @@ EXPORT_SYMBOL(dvb_pll_attach);


static int
-dvb_pll_probe(struct i2c_client *client, const struct i2c_device_id *id)
+dvb_pll_probe(struct i2c_client *client)
{
+ const struct i2c_device_id *id = i2c_client_get_device_id(client);
struct dvb_pll_config *cfg;
struct dvb_frontend *fe;
unsigned int desc_id;
@@ -941,7 +942,7 @@ static struct i2c_driver dvb_pll_driver = {
.driver = {
.name = "dvb_pll",
},
- .probe = dvb_pll_probe,
+ .probe_new = dvb_pll_probe,
.remove = dvb_pll_remove,
.id_table = dvb_pll_id,
};
--
2.38.1



2022-12-22 22:59:05

by Uwe Kleine-König

[permalink] [raw]
Subject: Re: [PATCH 304/606] media: dvb-frontends/dvb-pll: Convert to i2c's .probe_new()

Hello,

On Fri, Nov 18, 2022 at 11:40:38PM +0100, Uwe Kleine-K?nig wrote:
> .probe_new() doesn't get the i2c_device_id * parameter, so determine
> that explicitly in the probe function.
>
> Signed-off-by: Uwe Kleine-K?nig <[email protected]>

A part of the media patches in this series were applied by Hans in the
current merge window. I think it's the part of the patches that don't
depend on i2c_client_get_device_id().

Now that the function is available in Linus' tree (commit 662233731d66
("i2c: core: Introduce i2c_client_get_device_id helper function")), it
would be great if you picked the remaining patches for the next merge
window. You can use e.g.

b4 am -l -P 304,308,309,320,328,332,340,342,349,351,355,360,368,369,374,381,382,390,407 [email protected]

to achieve that.

Best regards and thanks,
Uwe

--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | https://www.pengutronix.de/ |


Attachments:
(No filename) (1.02 kB)
signature.asc (499.00 B)
Download all attachments