Re: [PATCH 2/2] drm: Unexport drm_connector_unregister_all()

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

 



On Wed, Jul 13, 2016 at 9:39 AM, Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> wrote:
> This has now been removed from all drivers as it is performed centrally
> as a part of device unregistration for modesetting drivers. With the last
> user gone, we can unexport it from the DRM module. That requires us to
> move the code slightly to avoid the need for a forward declaration.
>
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: David Airlie <airlied@xxxxxxxx>
> Cc: Daniel Vetter <daniel.vetter@xxxxxxxx>
> Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx

Reviewed-by: Sean Paul <seanpaul@xxxxxxxxxxxx>


> ---
>  drivers/gpu/drm/drm_crtc.c | 29 +++++++++--------------------
>  include/drm/drm_crtc.h     |  3 ---
>  2 files changed, 9 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index c85963f4f1dc..f65b75949c20 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -1115,6 +1115,15 @@ void drm_connector_unregister(struct drm_connector *connector)
>  }
>  EXPORT_SYMBOL(drm_connector_unregister);
>
> +static void drm_connector_unregister_all(struct drm_device *dev)
> +{
> +       struct drm_connector *connector;
> +
> +       /* FIXME: taking the mode config mutex ends up in a clash with sysfs */
> +       list_for_each_entry(connector, &dev->mode_config.connector_list, head)
> +               drm_connector_unregister(connector);
> +}
> +
>  static int drm_connector_register_all(struct drm_device *dev)
>  {
>         struct drm_connector *connector;
> @@ -1138,26 +1147,6 @@ err:
>         return ret;
>  }
>
> -/**
> - * drm_connector_unregister_all - unregister connector userspace interfaces
> - * @dev: drm device
> - *
> - * This functions unregisters all connectors from sysfs and other places so
> - * that userspace can no longer access them. Drivers should call this as the
> - * first step tearing down the device instace, or when the underlying
> - * physical device disappeared (e.g. USB unplug), right before calling
> - * drm_dev_unregister().
> - */
> -void drm_connector_unregister_all(struct drm_device *dev)
> -{
> -       struct drm_connector *connector;
> -
> -       /* FIXME: taking the mode config mutex ends up in a clash with sysfs */
> -       list_for_each_entry(connector, &dev->mode_config.connector_list, head)
> -               drm_connector_unregister(connector);
> -}
> -EXPORT_SYMBOL(drm_connector_unregister_all);
> -
>  static int drm_encoder_register_all(struct drm_device *dev)
>  {
>         struct drm_encoder *encoder;
> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index ddaa7243af55..b1e72322ebd6 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -2588,9 +2588,6 @@ static inline unsigned drm_connector_index(struct drm_connector *connector)
>         return connector->connector_id;
>  }
>
> -/* helpers to {un}register all connectors from sysfs for device */
> -extern void drm_connector_unregister_all(struct drm_device *dev);
> -
>  extern __printf(5, 6)
>  int drm_encoder_init(struct drm_device *dev,
>                      struct drm_encoder *encoder,
> --
> 2.8.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
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