mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 20:14:06 +02:00
drm/ofdrm: Open-code drm_simple_encoder_init()
The helper drm_simple_encoder_init() is a trivial helper around drm_encoder_init() and therefore deprecated. Open-code the function and remove the dependency. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://lore.kernel.org/r/20250401094056.32904-3-tzimmermann@suse.de
This commit is contained in:
parent
544ab3be96
commit
bca75ed92a
|
|
@ -21,7 +21,6 @@
|
|||
#include <drm/drm_managed.h>
|
||||
#include <drm/drm_modeset_helper_vtables.h>
|
||||
#include <drm/drm_probe_helper.h>
|
||||
#include <drm/drm_simple_kms_helper.h>
|
||||
|
||||
#define DRIVER_NAME "ofdrm"
|
||||
#define DRIVER_DESC "DRM driver for OF platform devices"
|
||||
|
|
@ -999,6 +998,10 @@ static const struct drm_crtc_funcs ofdrm_crtc_funcs = {
|
|||
.atomic_destroy_state = ofdrm_crtc_atomic_destroy_state,
|
||||
};
|
||||
|
||||
static const struct drm_encoder_funcs ofdrm_encoder_funcs = {
|
||||
.destroy = drm_encoder_cleanup,
|
||||
};
|
||||
|
||||
static int ofdrm_connector_helper_get_modes(struct drm_connector *connector)
|
||||
{
|
||||
struct ofdrm_device *odev = ofdrm_device_of_dev(connector->dev);
|
||||
|
|
@ -1309,7 +1312,7 @@ static struct ofdrm_device *ofdrm_device_create(struct drm_driver *drv,
|
|||
/* Encoder */
|
||||
|
||||
encoder = &odev->encoder;
|
||||
ret = drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_NONE);
|
||||
ret = drm_encoder_init(dev, encoder, &ofdrm_encoder_funcs, DRM_MODE_ENCODER_NONE, NULL);
|
||||
if (ret)
|
||||
return ERR_PTR(ret);
|
||||
encoder->possible_crtcs = drm_crtc_mask(crtc);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user