diff --git a/drivers/gpu/drm/tidss/tidss_encoder.c b/drivers/gpu/drm/tidss/tidss_encoder.c index 698f8d964ca0..10dbcc6cdf6a 100644 --- a/drivers/gpu/drm/tidss/tidss_encoder.c +++ b/drivers/gpu/drm/tidss/tidss_encoder.c @@ -9,11 +9,11 @@ #include #include #include +#include #include #include #include #include -#include #include "tidss_crtc.h" #include "tidss_drv.h" @@ -81,6 +81,10 @@ static const struct drm_bridge_funcs tidss_bridge_funcs = { .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state, }; +static const struct drm_encoder_funcs tidss_encoder_funcs = { + .destroy = drm_encoder_cleanup, +}; + int tidss_encoder_create(struct tidss_device *tidss, struct drm_bridge *next_bridge, u32 encoder_type, u32 possible_crtcs) @@ -95,8 +99,8 @@ int tidss_encoder_create(struct tidss_device *tidss, if (IS_ERR(t_enc)) return PTR_ERR(t_enc); - ret = drm_simple_encoder_init(&tidss->ddev, &t_enc->encoder, - encoder_type); + ret = drm_encoder_init(&tidss->ddev, &t_enc->encoder, + &tidss_encoder_funcs, encoder_type, NULL); if (ret) return ret;