[v2,18/28] drm/bridge: thc63: Use drm_bridge_init()
diff mbox series

Message ID 20191204114732.28514-19-mihail.atanassov@arm.com
State New
Headers show
Series
  • drm/bridge: Consolidate initialization
Related show

Commit Message

Mihail Atanassov Dec. 4, 2019, 11:48 a.m. UTC
No functional change.

Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
---
 drivers/gpu/drm/bridge/thc63lvd1024.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

Comments

Laurent Pinchart Dec. 5, 2019, 1:33 p.m. UTC | #1
Hi Mihail,

Thank you for the patch.

On Wed, Dec 04, 2019 at 11:48:18AM +0000, Mihail Atanassov wrote:
> No functional change.
> 
> Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
> ---
>  drivers/gpu/drm/bridge/thc63lvd1024.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/thc63lvd1024.c b/drivers/gpu/drm/bridge/thc63lvd1024.c
> index 3d74129b2995..abe806db5f4d 100644
> --- a/drivers/gpu/drm/bridge/thc63lvd1024.c
> +++ b/drivers/gpu/drm/bridge/thc63lvd1024.c
> @@ -218,11 +218,8 @@ static int thc63_probe(struct platform_device *pdev)
>  	if (ret)
>  		return ret;
>  
> -	thc63->bridge.driver_private = thc63;
> -	thc63->bridge.of_node = pdev->dev.of_node;
> -	thc63->bridge.funcs = &thc63_bridge_func;
> -	thc63->bridge.timings = &thc63->timings;
> -
> +	drm_bridge_init(&thc63->bridge, &pdev->dev, &thc63_bridge_func,
> +			&thc63->timings, thc63);

I think driver_private is unused, so the last argument can be NULL.

>  	drm_bridge_add(&thc63->bridge);
>  
>  	return 0;

Patch
diff mbox series

diff --git a/drivers/gpu/drm/bridge/thc63lvd1024.c b/drivers/gpu/drm/bridge/thc63lvd1024.c
index 3d74129b2995..abe806db5f4d 100644
--- a/drivers/gpu/drm/bridge/thc63lvd1024.c
+++ b/drivers/gpu/drm/bridge/thc63lvd1024.c
@@ -218,11 +218,8 @@  static int thc63_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	thc63->bridge.driver_private = thc63;
-	thc63->bridge.of_node = pdev->dev.of_node;
-	thc63->bridge.funcs = &thc63_bridge_func;
-	thc63->bridge.timings = &thc63->timings;
-
+	drm_bridge_init(&thc63->bridge, &pdev->dev, &thc63_bridge_func,
+			&thc63->timings, thc63);
 	drm_bridge_add(&thc63->bridge);
 
 	return 0;