summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/exynos
diff options
context:
space:
mode:
authorMichael Tretter <m.tretter@pengutronix.de>2020-09-11 16:53:59 +0300
committerInki Dae <inki.dae@samsung.com>2020-12-01 05:38:29 +0300
commite5d57c54038645928a904042ac89356b66c8cd3f (patch)
tree7b0b5159b8a1cf36e9a60de8d91fa54a15358807 /drivers/gpu/drm/exynos
parent60d1029b3f255640ce48f2ff46a2adac6069e413 (diff)
downloadlinux-e5d57c54038645928a904042ac89356b66c8cd3f.tar.xz
drm/exynos: remove in_bridge_node from exynos_dsi
We do not need to keep a reference to the in_bridge_node, but we can simply drop it, once we found and attached the previous bridge. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_dsi.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
index 5b9666fc7af1..086a8c96e563 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
@@ -282,7 +282,6 @@ struct exynos_dsi {
struct list_head transfer_list;
const struct exynos_dsi_driver_data *driver_data;
- struct device_node *in_bridge_node;
};
#define host_to_dsi(host) container_of(host, struct exynos_dsi, dsi_host)
@@ -1684,8 +1683,6 @@ static int exynos_dsi_parse_dt(struct exynos_dsi *dsi)
if (ret < 0)
return ret;
- dsi->in_bridge_node = of_graph_get_remote_node(node, DSI_PORT_IN, 0);
-
return 0;
}
@@ -1695,6 +1692,7 @@ static int exynos_dsi_bind(struct device *dev, struct device *master,
struct drm_encoder *encoder = dev_get_drvdata(dev);
struct exynos_dsi *dsi = encoder_to_dsi(encoder);
struct drm_device *drm_dev = data;
+ struct device_node *in_bridge_node;
struct drm_bridge *in_bridge;
int ret;
@@ -1706,10 +1704,12 @@ static int exynos_dsi_bind(struct device *dev, struct device *master,
if (ret < 0)
return ret;
- if (dsi->in_bridge_node) {
- in_bridge = of_drm_find_bridge(dsi->in_bridge_node);
+ in_bridge_node = of_graph_get_remote_node(dev->of_node, DSI_PORT_IN, 0);
+ if (in_bridge_node) {
+ in_bridge = of_drm_find_bridge(in_bridge_node);
if (in_bridge)
drm_bridge_attach(encoder, in_bridge, NULL, 0);
+ of_node_put(in_bridge_node);
}
return mipi_dsi_host_register(&dsi->dsi_host);
@@ -1827,17 +1827,12 @@ static int exynos_dsi_probe(struct platform_device *pdev)
err_disable_runtime:
pm_runtime_disable(dev);
- of_node_put(dsi->in_bridge_node);
return ret;
}
static int exynos_dsi_remove(struct platform_device *pdev)
{
- struct exynos_dsi *dsi = platform_get_drvdata(pdev);
-
- of_node_put(dsi->in_bridge_node);
-
pm_runtime_disable(&pdev->dev);
component_del(&pdev->dev, &exynos_dsi_component_ops);