dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: "Noralf Trønnes" <noralf@tronnes.org>
Cc: daniel.vetter@ffwll.ch, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/client: Rename drm_client_add() to drm_client_register()
Date: Wed, 3 Apr 2019 15:21:38 +0200	[thread overview]
Message-ID: <20190403132138.GD2665@phenom.ffwll.local> (raw)
In-Reply-To: <20190403125658.32389-1-noralf@tronnes.org>

On Wed, Apr 03, 2019 at 02:56:58PM +0200, Noralf Trønnes wrote:
> This is done to stay consistent with our naming scheme of
> _register() = others can start calling us from any thread.
> 
> Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Noralf Trønnes <noralf@tronnes.org>

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> ---
>  drivers/gpu/drm/drm_client.c    | 11 ++++++-----
>  drivers/gpu/drm/drm_fb_helper.c |  2 +-
>  include/drm/drm_client.h        |  2 +-
>  3 files changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_client.c b/drivers/gpu/drm/drm_client.c
> index 9b2bd28dde0a..f20d1dda3961 100644
> --- a/drivers/gpu/drm/drm_client.c
> +++ b/drivers/gpu/drm/drm_client.c
> @@ -69,7 +69,8 @@ EXPORT_SYMBOL(drm_client_close);
>   * @name: Client name
>   * @funcs: DRM client functions (optional)
>   *
> - * This initialises the client and opens a &drm_file. Use drm_client_add() to complete the process.
> + * This initialises the client and opens a &drm_file.
> + * Use drm_client_register() to complete the process.
>   * The caller needs to hold a reference on @dev before calling this function.
>   * The client is freed when the &drm_device is unregistered. See drm_client_release().
>   *
> @@ -108,16 +109,16 @@ int drm_client_init(struct drm_device *dev, struct drm_client_dev *client,
>  EXPORT_SYMBOL(drm_client_init);
>  
>  /**
> - * drm_client_add - Add client to the device list
> + * drm_client_register - Register client
>   * @client: DRM client
>   *
>   * Add the client to the &drm_device client list to activate its callbacks.
>   * @client must be initialized by a call to drm_client_init(). After
> - * drm_client_add() it is no longer permissible to call drm_client_release()
> + * drm_client_register() it is no longer permissible to call drm_client_release()
>   * directly (outside the unregister callback), instead cleanup will happen
>   * automatically on driver unload.
>   */
> -void drm_client_add(struct drm_client_dev *client)
> +void drm_client_register(struct drm_client_dev *client)
>  {
>  	struct drm_device *dev = client->dev;
>  
> @@ -125,7 +126,7 @@ void drm_client_add(struct drm_client_dev *client)
>  	list_add(&client->list, &dev->clientlist);
>  	mutex_unlock(&dev->clientlist_mutex);
>  }
> -EXPORT_SYMBOL(drm_client_add);
> +EXPORT_SYMBOL(drm_client_register);
>  
>  /**
>   * drm_client_release - Release DRM client resources
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 84791dd4a90d..367641c7754f 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -3322,7 +3322,7 @@ int drm_fbdev_generic_setup(struct drm_device *dev, unsigned int preferred_bpp)
>  	if (ret)
>  		DRM_DEV_DEBUG(dev->dev, "client hotplug ret=%d\n", ret);
>  
> -	drm_client_add(&fb_helper->client);
> +	drm_client_register(&fb_helper->client);
>  
>  	return 0;
>  }
> diff --git a/include/drm/drm_client.h b/include/drm/drm_client.h
> index 8b552b1a6ce9..268b2cf0052a 100644
> --- a/include/drm/drm_client.h
> +++ b/include/drm/drm_client.h
> @@ -90,7 +90,7 @@ struct drm_client_dev {
>  int drm_client_init(struct drm_device *dev, struct drm_client_dev *client,
>  		    const char *name, const struct drm_client_funcs *funcs);
>  void drm_client_release(struct drm_client_dev *client);
> -void drm_client_add(struct drm_client_dev *client);
> +void drm_client_register(struct drm_client_dev *client);
>  
>  void drm_client_dev_unregister(struct drm_device *dev);
>  void drm_client_dev_hotplug(struct drm_device *dev);
> -- 
> 2.20.1
> 

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

      reply	other threads:[~2019-04-03 13:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-03 12:56 [PATCH] drm/client: Rename drm_client_add() to drm_client_register() Noralf Trønnes
2019-04-03 13:21 ` Daniel Vetter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190403132138.GD2665@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=noralf@tronnes.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox