[026/606] drm/bridge: megachips: Convert to i2c's .probe_new()

Message ID 20221118224540.619276-27-uwe@kleine-koenig.org
State New
Headers
Series i2c: Complete conversion to i2c_probe_new |

Commit Message

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

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 .../gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c   | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
  

Comments

Laurent Pinchart Nov. 19, 2022, 5:31 p.m. UTC | #1
On Fri, Nov 18, 2022 at 11:36:00PM +0100, Uwe Kleine-König wrote:
> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> The probe function doesn't make use of the i2c_device_id * parameter so it
> can be trivially converted.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

> ---
>  .../gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c   | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c b/drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c
> index 97359f807bfc..4ee4a825a936 100644
> --- a/drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c
> +++ b/drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c
> @@ -336,8 +336,7 @@ static int ge_b850v3_register(void)
>  			"ge-b850v3-lvds-dp", ge_b850v3_lvds_ptr);
>  }
>  
> -static int stdp4028_ge_b850v3_fw_probe(struct i2c_client *stdp4028_i2c,
> -				       const struct i2c_device_id *id)
> +static int stdp4028_ge_b850v3_fw_probe(struct i2c_client *stdp4028_i2c)
>  {
>  	struct device *dev = &stdp4028_i2c->dev;
>  	int ret;
> @@ -376,7 +375,7 @@ MODULE_DEVICE_TABLE(of, stdp4028_ge_b850v3_fw_match);
>  
>  static struct i2c_driver stdp4028_ge_b850v3_fw_driver = {
>  	.id_table	= stdp4028_ge_b850v3_fw_i2c_table,
> -	.probe		= stdp4028_ge_b850v3_fw_probe,
> +	.probe_new	= stdp4028_ge_b850v3_fw_probe,
>  	.remove		= stdp4028_ge_b850v3_fw_remove,
>  	.driver		= {
>  		.name		= "stdp4028-ge-b850v3-fw",
> @@ -384,8 +383,7 @@ static struct i2c_driver stdp4028_ge_b850v3_fw_driver = {
>  	},
>  };
>  
> -static int stdp2690_ge_b850v3_fw_probe(struct i2c_client *stdp2690_i2c,
> -				       const struct i2c_device_id *id)
> +static int stdp2690_ge_b850v3_fw_probe(struct i2c_client *stdp2690_i2c)
>  {
>  	struct device *dev = &stdp2690_i2c->dev;
>  	int ret;
> @@ -424,7 +422,7 @@ MODULE_DEVICE_TABLE(of, stdp2690_ge_b850v3_fw_match);
>  
>  static struct i2c_driver stdp2690_ge_b850v3_fw_driver = {
>  	.id_table	= stdp2690_ge_b850v3_fw_i2c_table,
> -	.probe		= stdp2690_ge_b850v3_fw_probe,
> +	.probe_new	= stdp2690_ge_b850v3_fw_probe,
>  	.remove		= stdp2690_ge_b850v3_fw_remove,
>  	.driver		= {
>  		.name		= "stdp2690-ge-b850v3-fw",
> -- 
> 2.38.1
>
  

Patch

diff --git a/drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c b/drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c
index 97359f807bfc..4ee4a825a936 100644
--- a/drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c
+++ b/drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c
@@ -336,8 +336,7 @@  static int ge_b850v3_register(void)
 			"ge-b850v3-lvds-dp", ge_b850v3_lvds_ptr);
 }
 
-static int stdp4028_ge_b850v3_fw_probe(struct i2c_client *stdp4028_i2c,
-				       const struct i2c_device_id *id)
+static int stdp4028_ge_b850v3_fw_probe(struct i2c_client *stdp4028_i2c)
 {
 	struct device *dev = &stdp4028_i2c->dev;
 	int ret;
@@ -376,7 +375,7 @@  MODULE_DEVICE_TABLE(of, stdp4028_ge_b850v3_fw_match);
 
 static struct i2c_driver stdp4028_ge_b850v3_fw_driver = {
 	.id_table	= stdp4028_ge_b850v3_fw_i2c_table,
-	.probe		= stdp4028_ge_b850v3_fw_probe,
+	.probe_new	= stdp4028_ge_b850v3_fw_probe,
 	.remove		= stdp4028_ge_b850v3_fw_remove,
 	.driver		= {
 		.name		= "stdp4028-ge-b850v3-fw",
@@ -384,8 +383,7 @@  static struct i2c_driver stdp4028_ge_b850v3_fw_driver = {
 	},
 };
 
-static int stdp2690_ge_b850v3_fw_probe(struct i2c_client *stdp2690_i2c,
-				       const struct i2c_device_id *id)
+static int stdp2690_ge_b850v3_fw_probe(struct i2c_client *stdp2690_i2c)
 {
 	struct device *dev = &stdp2690_i2c->dev;
 	int ret;
@@ -424,7 +422,7 @@  MODULE_DEVICE_TABLE(of, stdp2690_ge_b850v3_fw_match);
 
 static struct i2c_driver stdp2690_ge_b850v3_fw_driver = {
 	.id_table	= stdp2690_ge_b850v3_fw_i2c_table,
-	.probe		= stdp2690_ge_b850v3_fw_probe,
+	.probe_new	= stdp2690_ge_b850v3_fw_probe,
 	.remove		= stdp2690_ge_b850v3_fw_remove,
 	.driver		= {
 		.name		= "stdp2690-ge-b850v3-fw",