summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/bridge/nwl-dsi.c
diff options
context:
space:
mode:
authorJagan Teki <jagan@amarulasolutions.com>2022-03-31 18:45:00 +0300
committerRobert Foss <robert.foss@linaro.org>2022-03-31 18:52:46 +0300
commit4f4601071ca544559b27b49a043167c009b77c64 (patch)
treeee431c87d1ee7b831151112014c6f7cf2dddd5e4 /drivers/gpu/drm/bridge/nwl-dsi.c
parent65af9070cd09a9a5a5306ffc2b39b1674c7e5716 (diff)
downloadlinux-4f4601071ca544559b27b49a043167c009b77c64.tar.xz
drm: bridge: nwl-dsi: Switch to devm_drm_of_get_bridge
devm_drm_of_get_bridge is capable of looking up the downstream bridge and panel and trying to add a panel bridge if the panel is found. Replace explicit finding calls with devm_drm_of_get_bridge. Reviewed-by: Guido Günther <agx@sigxcpu.org> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Signed-off-by: Robert Foss <robert.foss@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20220331154503.66054-2-jagan@amarulasolutions.com
Diffstat (limited to 'drivers/gpu/drm/bridge/nwl-dsi.c')
-rw-r--r--drivers/gpu/drm/bridge/nwl-dsi.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/drivers/gpu/drm/bridge/nwl-dsi.c b/drivers/gpu/drm/bridge/nwl-dsi.c
index e34fb09b90b9..a549da5b3f93 100644
--- a/drivers/gpu/drm/bridge/nwl-dsi.c
+++ b/drivers/gpu/drm/bridge/nwl-dsi.c
@@ -25,7 +25,6 @@
#include <drm/drm_bridge.h>
#include <drm/drm_mipi_dsi.h>
#include <drm/drm_of.h>
-#include <drm/drm_panel.h>
#include <drm/drm_print.h>
#include <video/mipi_display.h>
@@ -912,22 +911,10 @@ static int nwl_dsi_bridge_attach(struct drm_bridge *bridge,
{
struct nwl_dsi *dsi = bridge_to_dsi(bridge);
struct drm_bridge *panel_bridge;
- struct drm_panel *panel;
- int ret;
-
- ret = drm_of_find_panel_or_bridge(dsi->dev->of_node, 1, 0, &panel,
- &panel_bridge);
- if (ret)
- return ret;
-
- if (panel) {
- panel_bridge = drm_panel_bridge_add(panel);
- if (IS_ERR(panel_bridge))
- return PTR_ERR(panel_bridge);
- }
- if (!panel_bridge)
- return -EPROBE_DEFER;
+ panel_bridge = devm_drm_of_get_bridge(dsi->dev, dsi->dev->of_node, 1, 0);
+ if (IS_ERR(panel_bridge))
+ return PTR_ERR(panel_bridge);
return drm_bridge_attach(bridge->encoder, panel_bridge, bridge, flags);
}