[22/30] drm/exynos: mic: Use drm_bridge_init()
diff mbox series

Message ID 20191126131541.47393-23-mihail.atanassov@arm.com
State Not Applicable
Headers show
Series
  • Untitled series #208303
Related show

Commit Message

Mihail Atanassov Nov. 26, 2019, 1:16 p.m. UTC
No functional change: no logic depends on driver_private being NULL, so
it's safe to set it earlier in exynos_mic_probe.

Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
---
 drivers/gpu/drm/exynos/exynos_drm_mic.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

Comments

Inki Dae Dec. 3, 2019, 4:54 a.m. UTC | #1
19. 11. 26. 오후 10:16에 Mihail Atanassov 이(가) 쓴 글:
> No functional change: no logic depends on driver_private being NULL, so
> it's safe to set it earlier in exynos_mic_probe.
Acked-by: Inki Dae <inki.dae@samsung.com>

And tested this patch on TM2 and TM2E boards.
Tested-by: Inki Dae <inki.dae@samsung.com>

Thanks,
Inki Dae

> 
> Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_mic.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_mic.c b/drivers/gpu/drm/exynos/exynos_drm_mic.c
> index f41d75923557..caad348a5646 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_mic.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_mic.c
> @@ -309,10 +309,6 @@ static const struct drm_bridge_funcs mic_bridge_funcs = {
>  static int exynos_mic_bind(struct device *dev, struct device *master,
>  			   void *data)
>  {
> -	struct exynos_mic *mic = dev_get_drvdata(dev);
> -
> -	mic->bridge.driver_private = mic;
> -
>  	return 0;
>  }
>  
> @@ -422,9 +418,7 @@ static int exynos_mic_probe(struct platform_device *pdev)
>  
>  	platform_set_drvdata(pdev, mic);
>  
> -	mic->bridge.funcs = &mic_bridge_funcs;
> -	mic->bridge.of_node = dev->of_node;
> -
> +	drm_bridge_init(&mic->bridge, dev, &mic_bridge_funcs, NULL, mic);
>  	drm_bridge_add(&mic->bridge);
>  
>  	pm_runtime_enable(dev);
>

Patch
diff mbox series

diff --git a/drivers/gpu/drm/exynos/exynos_drm_mic.c b/drivers/gpu/drm/exynos/exynos_drm_mic.c
index f41d75923557..caad348a5646 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_mic.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_mic.c
@@ -309,10 +309,6 @@  static const struct drm_bridge_funcs mic_bridge_funcs = {
 static int exynos_mic_bind(struct device *dev, struct device *master,
 			   void *data)
 {
-	struct exynos_mic *mic = dev_get_drvdata(dev);
-
-	mic->bridge.driver_private = mic;
-
 	return 0;
 }
 
@@ -422,9 +418,7 @@  static int exynos_mic_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, mic);
 
-	mic->bridge.funcs = &mic_bridge_funcs;
-	mic->bridge.of_node = dev->of_node;
-
+	drm_bridge_init(&mic->bridge, dev, &mic_bridge_funcs, NULL, mic);
 	drm_bridge_add(&mic->bridge);
 
 	pm_runtime_enable(dev);