[PATCH] drm/cirrus: Add missing drm_connector_unregister()

Daniel Vetter daniel at ffwll.ch
Wed Jul 19 06:35:08 UTC 2017


On Tue, Jul 18, 2017 at 04:49:33PM +0200, Takashi Iwai wrote:
> From: Egbert Eich <eich at suse.de>
> 
> When destroying connector unregister it.
> 
> Signed-off-by: Egbert Eich <eich at suse.de>
> Signed-off-by: Takashi Iwai <tiwai at suse.de>

drm_dev_unregister unregisters all connectors too. Explicitly calling
drm_connector_unregister should only be needed when you
a) screwed up your unload sequence. Get rid of ->unload and make sure you
call drm_dev_unregister first to fix this properly
b) hot-unplug. Doesn't apply to cirrus.

I think this can/should be just dropped.
-Daniel
> ---
>  drivers/gpu/drm/cirrus/cirrus_mode.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/cirrus/cirrus_mode.c b/drivers/gpu/drm/cirrus/cirrus_mode.c
> index 53f6f0f84206..e5531887646b 100644
> --- a/drivers/gpu/drm/cirrus/cirrus_mode.c
> +++ b/drivers/gpu/drm/cirrus/cirrus_mode.c
> @@ -502,6 +502,7 @@ static struct drm_encoder *cirrus_connector_best_encoder(struct drm_connector
>  
>  static void cirrus_connector_destroy(struct drm_connector *connector)
>  {
> +	drm_connector_unregister(connector);
>  	drm_connector_cleanup(connector);
>  	kfree(connector);
>  }
> -- 
> 2.13.2
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list