diff mbox series

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

Message ID 20221118224540.619276-305-uwe@kleine-koenig.org (mailing list archive)
State New, archived
Headers show
Series i2c: Complete conversion to i2c_probe_new | expand

Commit Message

Uwe Kleine-König Nov. 18, 2022, 10:40 p.m. UTC
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

.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 <u.kleine-koenig@pengutronix.de>
---
 drivers/media/dvb-frontends/dvb-pll.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Uwe Kleine-König Dec. 22, 2022, 10:03 p.m. UTC | #1
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 <u.kleine-koenig@pengutronix.de>

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 20221118224540.619276-1-uwe@kleine-koenig.org

to achieve that.

Best regards and thanks,
Uwe
diff mbox series

Patch

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,
 };