From: Jagan Teki Subject: [PATCH v2 1/6] drm/sun4i: dsi: Use drm panel_or_bridge call Date: Fri, 24 May 2019 16:11:10 +0530 Message-ID: <20190524104115.20161-2-jagan@amarulasolutions.com> References: <20190524104115.20161-1-jagan@amarulasolutions.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <20190524104115.20161-1-jagan@amarulasolutions.com> Sender: linux-kernel-owner@vger.kernel.org To: Andrzej Hajda , Laurent Pinchart , Chen-Yu Tsai , Maxime Ripard , David Airlie , Daniel Vetter , Rob Herring , Mark Rutland Cc: Michael Trimarchi , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com, Jagan Teki , Paul Kocialkowski List-Id: dri-devel@lists.freedesktop.org Right now the driver is finding the panel using of_drm_find_panel, replace the same with drm_of_find_panel_or_bridge which would help to find the panel or bridge on the same call if bridge support added in future. Added NULL in bridge argument, same will replace with bridge parameter once bridge supported. Cc: Paul Kocialkowski Signed-off-by: Jagan Teki --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 65771e9a343a..ae2fe31b05b1 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -964,11 +965,13 @@ static int sun6i_dsi_attach(struct mipi_dsi_host *host, struct mipi_dsi_device *device) { struct sun6i_dsi *dsi = host_to_sun6i_dsi(host); + int ret; dsi->device = device; - dsi->panel = of_drm_find_panel(device->dev.of_node); - if (IS_ERR(dsi->panel)) - return PTR_ERR(dsi->panel); + ret = drm_of_find_panel_or_bridge(host->dev->of_node, 0, 0, + &dsi->panel, NULL); + if (ret) + return ret; dev_info(host->dev, "Attached device %s\n", device->name); -- 2.18.0.321.gffc6fa0e3