linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: i2c: adv748x: Convert to new i2c device probe()
@ 2019-07-10 12:37 Kieran Bingham
  2019-07-11  4:40 ` Niklas Söderlund
  2019-07-18 16:43 ` Wolfram Sang
  0 siblings, 2 replies; 3+ messages in thread
From: Kieran Bingham @ 2019-07-10 12:37 UTC (permalink / raw)
  To: linux-media, linux-renesas-soc, Kieran Bingham
  Cc: Wolfram Sang, Laurent Pinchart, Kieran Bingham,
	Mauro Carvalho Chehab, open list

The I2C core framework provides a simplified probe framework from commit
b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new() call-back type").

Convert the ADV748x to utilise this simplfied i2c driver registration.

Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
---
 drivers/media/i2c/adv748x/adv748x-core.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/drivers/media/i2c/adv748x/adv748x-core.c b/drivers/media/i2c/adv748x/adv748x-core.c
index 097e94279cf7..ae2b6eb93e09 100644
--- a/drivers/media/i2c/adv748x/adv748x-core.c
+++ b/drivers/media/i2c/adv748x/adv748x-core.c
@@ -677,8 +677,7 @@ static void adv748x_dt_cleanup(struct adv748x_state *state)
 		of_node_put(state->endpoints[i]);
 }
 
-static int adv748x_probe(struct i2c_client *client,
-			 const struct i2c_device_id *id)
+static int adv748x_probe(struct i2c_client *client)
 {
 	struct adv748x_state *state;
 	int ret;
@@ -806,13 +805,6 @@ static int adv748x_remove(struct i2c_client *client)
 	return 0;
 }
 
-static const struct i2c_device_id adv748x_id[] = {
-	{ "adv7481", 0 },
-	{ "adv7482", 0 },
-	{ },
-};
-MODULE_DEVICE_TABLE(i2c, adv748x_id);
-
 static const struct of_device_id adv748x_of_table[] = {
 	{ .compatible = "adi,adv7481", },
 	{ .compatible = "adi,adv7482", },
@@ -825,9 +817,8 @@ static struct i2c_driver adv748x_driver = {
 		.name = "adv748x",
 		.of_match_table = adv748x_of_table,
 	},
-	.probe = adv748x_probe,
+	.probe_new = adv748x_probe,
 	.remove = adv748x_remove,
-	.id_table = adv748x_id,
 };
 
 module_i2c_driver(adv748x_driver);
-- 
2.20.1


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

* Re: [PATCH] media: i2c: adv748x: Convert to new i2c device probe()
  2019-07-10 12:37 [PATCH] media: i2c: adv748x: Convert to new i2c device probe() Kieran Bingham
@ 2019-07-11  4:40 ` Niklas Söderlund
  2019-07-18 16:43 ` Wolfram Sang
  1 sibling, 0 replies; 3+ messages in thread
From: Niklas Söderlund @ 2019-07-11  4:40 UTC (permalink / raw)
  To: Kieran Bingham
  Cc: linux-media, linux-renesas-soc, Wolfram Sang, Laurent Pinchart,
	Kieran Bingham, Mauro Carvalho Chehab, open list

Hi Kieran,

Thanks for your patch.

On 2019-07-10 13:37:19 +0100, Kieran Bingham wrote:
> The I2C core framework provides a simplified probe framework from commit
> b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new() call-back type").
> 
> Convert the ADV748x to utilise this simplfied i2c driver registration.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

Looks good,

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> ---
>  drivers/media/i2c/adv748x/adv748x-core.c | 13 ++-----------
>  1 file changed, 2 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/media/i2c/adv748x/adv748x-core.c b/drivers/media/i2c/adv748x/adv748x-core.c
> index 097e94279cf7..ae2b6eb93e09 100644
> --- a/drivers/media/i2c/adv748x/adv748x-core.c
> +++ b/drivers/media/i2c/adv748x/adv748x-core.c
> @@ -677,8 +677,7 @@ static void adv748x_dt_cleanup(struct adv748x_state *state)
>  		of_node_put(state->endpoints[i]);
>  }
>  
> -static int adv748x_probe(struct i2c_client *client,
> -			 const struct i2c_device_id *id)
> +static int adv748x_probe(struct i2c_client *client)
>  {
>  	struct adv748x_state *state;
>  	int ret;
> @@ -806,13 +805,6 @@ static int adv748x_remove(struct i2c_client *client)
>  	return 0;
>  }
>  
> -static const struct i2c_device_id adv748x_id[] = {
> -	{ "adv7481", 0 },
> -	{ "adv7482", 0 },
> -	{ },
> -};
> -MODULE_DEVICE_TABLE(i2c, adv748x_id);
> -
>  static const struct of_device_id adv748x_of_table[] = {
>  	{ .compatible = "adi,adv7481", },
>  	{ .compatible = "adi,adv7482", },
> @@ -825,9 +817,8 @@ static struct i2c_driver adv748x_driver = {
>  		.name = "adv748x",
>  		.of_match_table = adv748x_of_table,
>  	},
> -	.probe = adv748x_probe,
> +	.probe_new = adv748x_probe,
>  	.remove = adv748x_remove,
> -	.id_table = adv748x_id,
>  };
>  
>  module_i2c_driver(adv748x_driver);
> -- 
> 2.20.1
> 

-- 
Regards,
Niklas Söderlund

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

* Re: [PATCH] media: i2c: adv748x: Convert to new i2c device probe()
  2019-07-10 12:37 [PATCH] media: i2c: adv748x: Convert to new i2c device probe() Kieran Bingham
  2019-07-11  4:40 ` Niklas Söderlund
@ 2019-07-18 16:43 ` Wolfram Sang
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2019-07-18 16:43 UTC (permalink / raw)
  To: Kieran Bingham
  Cc: linux-media, linux-renesas-soc, Laurent Pinchart, Kieran Bingham,
	Mauro Carvalho Chehab, open list

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

On Wed, Jul 10, 2019 at 01:37:19PM +0100, Kieran Bingham wrote:
> The I2C core framework provides a simplified probe framework from commit
> b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new() call-back type").
> 
> Convert the ADV748x to utilise this simplfied i2c driver registration.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2019-07-18 16:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-10 12:37 [PATCH] media: i2c: adv748x: Convert to new i2c device probe() Kieran Bingham
2019-07-11  4:40 ` Niklas Söderlund
2019-07-18 16:43 ` Wolfram Sang

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).