From d877d6ea7773b3aa3d03c359c85262fb0468c41a Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Thu, 5 Mar 2020 16:59:45 +0100 Subject: drm/tilcdc: Use simple encoder The tilcdc driver uses empty implementations for its encoders. Replace the code with the generic simple encoder. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Acked-by: Daniel Vetter Acked-by: Jyri Sarha Link: https://patchwork.freedesktop.org/patch/msgid/20200305155950.2705-18-tzimmermann@suse.de --- drivers/gpu/drm/tilcdc/tilcdc_panel.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'drivers/gpu/drm/tilcdc/tilcdc_panel.c') diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c b/drivers/gpu/drm/tilcdc/tilcdc_panel.c index 5584e656b857..12823d60c4e8 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_panel.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_panel.c @@ -16,6 +16,7 @@ #include #include #include +#include #include "tilcdc_drv.h" #include "tilcdc_panel.h" @@ -74,10 +75,6 @@ static void panel_encoder_mode_set(struct drm_encoder *encoder, /* nothing needed */ } -static const struct drm_encoder_funcs panel_encoder_funcs = { - .destroy = drm_encoder_cleanup, -}; - static const struct drm_encoder_helper_funcs panel_encoder_helper_funcs = { .dpms = panel_encoder_dpms, .prepare = panel_encoder_prepare, @@ -102,8 +99,7 @@ static struct drm_encoder *panel_encoder_create(struct drm_device *dev, encoder = &panel_encoder->base; encoder->possible_crtcs = 1; - ret = drm_encoder_init(dev, encoder, &panel_encoder_funcs, - DRM_MODE_ENCODER_LVDS, NULL); + ret = drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_LVDS); if (ret < 0) goto fail; -- cgit v1.2.3-70-g09d2