Remove the deprecated trivial helper drm_simple_encoder_init(). Inline the call to drm_encoder_init and add instance of drm_encoder_funcs.
Signed-off-by: Jacob McLemore <[email protected]> --- Saw this was a good first task in Documentation/gpu/todo.rst. This is my first patch, so apologies if I've set up anything wrong in either my email client or gitconfig and the patch ends up invalid. --- drivers/gpu/drm/tegra/sor.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c index de8b2dfc4984..4ac23aedb682 100644 --- a/drivers/gpu/drm/tegra/sor.c +++ b/drivers/gpu/drm/tegra/sor.c @@ -25,7 +25,6 @@ #include <drm/drm_file.h> #include <drm/drm_panel.h> #include <drm/drm_print.h> -#include <drm/drm_simple_kms_helper.h> #include "dc.h" #include "dp.h" @@ -3038,6 +3037,10 @@ static const struct tegra_sor_ops tegra_sor_dp_ops = { .probe = tegra_sor_dp_probe, }; +static const struct drm_encoder_funcs tegra_sor_encoder_funcs_cleanup = { + .destroy = drm_encoder_cleanup, +}; + static int tegra_sor_init(struct host1x_client *client) { struct drm_device *drm = dev_get_drvdata(client->host); @@ -3081,7 +3084,7 @@ static int tegra_sor_init(struct host1x_client *client) &tegra_sor_connector_helper_funcs); sor->output.connector.dpms = DRM_MODE_DPMS_OFF; - drm_simple_encoder_init(drm, &sor->output.encoder, encoder); + drm_encoder_init(drm, &sor->output.encoder, &tegra_sor_encoder_funcs_cleanup, encoder, NULL); drm_encoder_helper_add(&sor->output.encoder, helpers); drm_connector_attach_encoder(&sor->output.connector, base-commit: 79bd2dded182b1d458b18e62684b7f82ffc682e5 -- 2.43.0
