diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2020-12-10 16:38:27 +0100 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2021-01-04 12:59:33 +0100 |
commit | f35a2a99100fbed583efaf07919ef071cd75b059 (patch) | |
tree | 05104e1c38ed2c4343a4933b5257ce03101b73ea /drivers/gpu/drm/drm_encoder.c | |
parent | c2d789fb500cbdb19a48a57451bb402f00996e9f (diff) | |
download | linux-f35a2a99100fbed583efaf07919ef071cd75b059.tar.gz linux-f35a2a99100fbed583efaf07919ef071cd75b059.tar.bz2 linux-f35a2a99100fbed583efaf07919ef071cd75b059.zip |
drm/encoder: make encoder control functions optional
Simple managed encoders do not require the .destroy callback,
make the whole funcs structure optional.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/drm_encoder.c')
-rw-r--r-- | drivers/gpu/drm/drm_encoder.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_encoder.c b/drivers/gpu/drm/drm_encoder.c index e555281f43d4..b0b86a3c08f5 100644 --- a/drivers/gpu/drm/drm_encoder.c +++ b/drivers/gpu/drm/drm_encoder.c @@ -72,7 +72,7 @@ int drm_encoder_register_all(struct drm_device *dev) int ret = 0; drm_for_each_encoder(encoder, dev) { - if (encoder->funcs->late_register) + if (encoder->funcs && encoder->funcs->late_register) ret = encoder->funcs->late_register(encoder); if (ret) return ret; @@ -86,7 +86,7 @@ void drm_encoder_unregister_all(struct drm_device *dev) struct drm_encoder *encoder; drm_for_each_encoder(encoder, dev) { - if (encoder->funcs->early_unregister) + if (encoder->funcs && encoder->funcs->early_unregister) encoder->funcs->early_unregister(encoder); } } |