diff mbox

[2/2] drm/exynos: mic: add a bridge at probe

Message ID 1499066879-13241-3-git-send-email-inki.dae@samsung.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Inki Dae July 3, 2017, 7:27 a.m. UTC
This patch moves drm_bridge_add call into probe.

This change is required by DSI driver so that
the brige can be bound at DSI driver's probe.

Suggested-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_mic.c | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

Comments

Andrzej Hajda July 3, 2017, 10:37 a.m. UTC | #1
On 03.07.2017 09:27, Inki Dae wrote:
> This patch moves drm_bridge_add call into probe.
>
> This change is required by DSI driver so that
> the brige can be bound at DSI driver's probe.
>
> Suggested-by: Andrzej Hajda <a.hajda@samsung.com>
> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>

 --
Regards
Andrzej

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Hoegeun Kwon July 5, 2017, 7:04 a.m. UTC | #2
On 07/03/2017 04:27 PM, Inki Dae wrote:
> This patch moves drm_bridge_add call into probe.
>
> This change is required by DSI driver so that
> the brige can be bound at DSI driver's probe.
>
> Suggested-by: Andrzej Hajda <a.hajda@samsung.com>
> Signed-off-by: Inki Dae <inki.dae@samsung.com>

Reviewed-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>

Best regards,
Hoegeun

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/gpu/drm/exynos/exynos_drm_mic.c b/drivers/gpu/drm/exynos/exynos_drm_mic.c
index e457205..5ea6e3d 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_mic.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_mic.c
@@ -340,16 +340,10 @@  static int exynos_mic_bind(struct device *dev, struct device *master,
 			   void *data)
 {
 	struct exynos_mic *mic = dev_get_drvdata(dev);
-	int ret;
 
-	mic->bridge.funcs = &mic_bridge_funcs;
-	mic->bridge.of_node = dev->of_node;
 	mic->bridge.driver_private = mic;
-	ret = drm_bridge_add(&mic->bridge);
-	if (ret)
-		DRM_ERROR("mic: Failed to add MIC to the global bridge list\n");
 
-	return ret;
+	return 0;
 }
 
 static void exynos_mic_unbind(struct device *dev, struct device *master,
@@ -461,6 +455,15 @@  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;
+
+	ret = drm_bridge_add(&mic->bridge);
+	if (ret) {
+		DRM_ERROR("mic: Failed to add MIC to the global bridge list\n");
+		return ret;
+	}
+
 	pm_runtime_enable(dev);
 
 	ret = component_add(dev, &exynos_mic_component_ops);