From: Sam Ravnborg Date: Sun, 4 Aug 2019 20:16:23 +0000 (+0200) Subject: drm/exynos: fix opencoded use of drm_panel_* X-Git-Tag: v5.10.7~2352^2~6^2~784 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5f9f81c60162d270393432e5ccca834096dccc08;p=platform%2Fkernel%2Flinux-rpi.git drm/exynos: fix opencoded use of drm_panel_* drm_panel_attach() will check if there is a controller already attached - drop the check in the driver. Use drm_panel_get_modes() so the driver no longer uses the function pointer. Signed-off-by: Sam Ravnborg Reviewed-by: Emil Velikov Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20190804201637.1240-3-sam@ravnborg.org --- diff --git a/drivers/gpu/drm/exynos/exynos_drm_dpi.c b/drivers/gpu/drm/exynos/exynos_drm_dpi.c index 3cebb19..5479ff7 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dpi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dpi.c @@ -43,7 +43,7 @@ exynos_dpi_detect(struct drm_connector *connector, bool force) { struct exynos_dpi *ctx = connector_to_dpi(connector); - if (ctx->panel && !ctx->panel->connector) + if (ctx->panel) drm_panel_attach(ctx->panel, &ctx->connector); return connector_status_connected; @@ -85,7 +85,7 @@ static int exynos_dpi_get_modes(struct drm_connector *connector) } if (ctx->panel) - return ctx->panel->funcs->get_modes(ctx->panel); + return drm_panel_get_modes(ctx->panel); return 0; }