Re: [PATCH 3/3] drm/sun4i: Remove open-coded drm_connector_register_all()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 21, 2016 at 10:28:03AM +0100, Chris Wilson wrote:
> drm_dev_register() will now register all known connectors, so we no
> longer have to do so manually.
> 
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Maxime Ripard <maxime.ripard@xxxxxxxxxxxxxxxxxx>
> Cc: David Airlie <airlied@xxxxxxxx>
> Cc: Chen-Yu Tsai <wens@xxxxxxxx>
> Cc: Daniel Vetter <daniel.vetter@xxxxxxxx>
> Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
> Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx

Merged all 3 to drm-misc, thanks.
-Daniel

> ---
>  drivers/gpu/drm/sun4i/sun4i_drv.c | 34 ----------------------------------
>  1 file changed, 34 deletions(-)
> 
> diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c
> index 68e9d85085fb..59cd8b27ee02 100644
> --- a/drivers/gpu/drm/sun4i/sun4i_drv.c
> +++ b/drivers/gpu/drm/sun4i/sun4i_drv.c
> @@ -24,34 +24,6 @@
>  #include "sun4i_layer.h"
>  #include "sun4i_tcon.h"
>  
> -static int sun4i_drv_connector_plug_all(struct drm_device *drm)
> -{
> -	struct drm_connector *connector, *failed;
> -	int ret;
> -
> -	mutex_lock(&drm->mode_config.mutex);
> -	list_for_each_entry(connector, &drm->mode_config.connector_list, head) {
> -		ret = drm_connector_register(connector);
> -		if (ret) {
> -			failed = connector;
> -			goto err;
> -		}
> -	}
> -	mutex_unlock(&drm->mode_config.mutex);
> -	return 0;
> -
> -err:
> -	list_for_each_entry(connector, &drm->mode_config.connector_list, head) {
> -		if (failed == connector)
> -			break;
> -
> -		drm_connector_unregister(connector);
> -	}
> -	mutex_unlock(&drm->mode_config.mutex);
> -
> -	return ret;
> -}
> -
>  static int sun4i_drv_enable_vblank(struct drm_device *drm, unsigned int pipe)
>  {
>  	struct sun4i_drv *drv = drm->dev_private;
> @@ -187,14 +159,8 @@ static int sun4i_drv_bind(struct device *dev)
>  	if (ret)
>  		goto free_drm;
>  
> -	ret = sun4i_drv_connector_plug_all(drm);
> -	if (ret)
> -		goto unregister_drm;
> -
>  	return 0;
>  
> -unregister_drm:
> -	drm_dev_unregister(drm);
>  free_drm:
>  	drm_dev_unref(drm);
>  	return ret;
> -- 
> 2.8.1
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux