Commit a1170f90 authored by Thomas Zimmermann's avatar Thomas Zimmermann

drm/i2c/tda998x: Use simple encoder

The tda998x driver uses an empty implementation for its encoder. Replace
the code with the generic simple encoder.
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200305155950.2705-8-tzimmermann@suse.de
parent 785b07e1
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <drm/drm_of.h> #include <drm/drm_of.h>
#include <drm/drm_print.h> #include <drm/drm_print.h>
#include <drm/drm_probe_helper.h> #include <drm/drm_probe_helper.h>
#include <drm/drm_simple_kms_helper.h>
#include <drm/i2c/tda998x.h> #include <drm/i2c/tda998x.h>
#include <media/cec-notifier.h> #include <media/cec-notifier.h>
...@@ -1997,15 +1998,6 @@ static int tda998x_create(struct device *dev) ...@@ -1997,15 +1998,6 @@ static int tda998x_create(struct device *dev)
/* DRM encoder functions */ /* DRM encoder functions */
static void tda998x_encoder_destroy(struct drm_encoder *encoder)
{
drm_encoder_cleanup(encoder);
}
static const struct drm_encoder_funcs tda998x_encoder_funcs = {
.destroy = tda998x_encoder_destroy,
};
static int tda998x_encoder_init(struct device *dev, struct drm_device *drm) static int tda998x_encoder_init(struct device *dev, struct drm_device *drm)
{ {
struct tda998x_priv *priv = dev_get_drvdata(dev); struct tda998x_priv *priv = dev_get_drvdata(dev);
...@@ -2023,8 +2015,8 @@ static int tda998x_encoder_init(struct device *dev, struct drm_device *drm) ...@@ -2023,8 +2015,8 @@ static int tda998x_encoder_init(struct device *dev, struct drm_device *drm)
priv->encoder.possible_crtcs = crtcs; priv->encoder.possible_crtcs = crtcs;
ret = drm_encoder_init(drm, &priv->encoder, &tda998x_encoder_funcs, ret = drm_simple_encoder_init(drm, &priv->encoder,
DRM_MODE_ENCODER_TMDS, NULL); DRM_MODE_ENCODER_TMDS);
if (ret) if (ret)
goto err_encoder; goto err_encoder;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment