diff mbox

drm/tinydrm: Replace drm_dev_unref with drm_dev_put

Message ID 20180713134601.14391-1-tzimmermann@suse.de (mailing list archive)
State New, archived
Headers show

Commit Message

Thomas Zimmermann July 13, 2018, 1:46 p.m. UTC
This patch unifies the naming of DRM functions for reference counting
of struct drm_device. The resulting code is more aligned with the rest
of the Linux kernel interfaces.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/tinydrm/core/tinydrm-core.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Noralf Trønnes Aug. 7, 2018, 3:15 p.m. UTC | #1
Den 13.07.2018 15.46, skrev Thomas Zimmermann:
> This patch unifies the naming of DRM functions for reference counting
> of struct drm_device. The resulting code is more aligned with the rest
> of the Linux kernel interfaces.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---

Thanks, applied to drm-misc.

Noralf.

>   drivers/gpu/drm/tinydrm/core/tinydrm-core.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/tinydrm/core/tinydrm-core.c b/drivers/gpu/drm/tinydrm/core/tinydrm-core.c
> index 19c7f70adfa5..255341ee4eb9 100644
> --- a/drivers/gpu/drm/tinydrm/core/tinydrm-core.c
> +++ b/drivers/gpu/drm/tinydrm/core/tinydrm-core.c
> @@ -135,7 +135,7 @@ static int tinydrm_init(struct device *parent, struct tinydrm_device *tdev,
>   	/*
>   	 * We don't embed drm_device, because that prevent us from using
>   	 * devm_kzalloc() to allocate tinydrm_device in the driver since
> -	 * drm_dev_unref() frees the structure. The devm_ functions provide
> +	 * drm_dev_put() frees the structure. The devm_ functions provide
>   	 * for easy error handling.
>   	 */
>   	drm = drm_dev_alloc(driver, parent);
> @@ -155,7 +155,7 @@ static void tinydrm_fini(struct tinydrm_device *tdev)
>   	drm_mode_config_cleanup(tdev->drm);
>   	mutex_destroy(&tdev->dirty_lock);
>   	tdev->drm->dev_private = NULL;
> -	drm_dev_unref(tdev->drm);
> +	drm_dev_put(tdev->drm);
>   }
>   
>   static void devm_tinydrm_release(void *data)
> @@ -172,7 +172,7 @@ static void devm_tinydrm_release(void *data)
>    *
>    * This function initializes @tdev, the underlying DRM device and it's
>    * mode_config. Resources will be automatically freed on driver detach (devres)
> - * using drm_mode_config_cleanup() and drm_dev_unref().
> + * using drm_mode_config_cleanup() and drm_dev_put().
>    *
>    * Returns:
>    * Zero on success, negative error code on failure.
diff mbox

Patch

diff --git a/drivers/gpu/drm/tinydrm/core/tinydrm-core.c b/drivers/gpu/drm/tinydrm/core/tinydrm-core.c
index 19c7f70adfa5..255341ee4eb9 100644
--- a/drivers/gpu/drm/tinydrm/core/tinydrm-core.c
+++ b/drivers/gpu/drm/tinydrm/core/tinydrm-core.c
@@ -135,7 +135,7 @@  static int tinydrm_init(struct device *parent, struct tinydrm_device *tdev,
 	/*
 	 * We don't embed drm_device, because that prevent us from using
 	 * devm_kzalloc() to allocate tinydrm_device in the driver since
-	 * drm_dev_unref() frees the structure. The devm_ functions provide
+	 * drm_dev_put() frees the structure. The devm_ functions provide
 	 * for easy error handling.
 	 */
 	drm = drm_dev_alloc(driver, parent);
@@ -155,7 +155,7 @@  static void tinydrm_fini(struct tinydrm_device *tdev)
 	drm_mode_config_cleanup(tdev->drm);
 	mutex_destroy(&tdev->dirty_lock);
 	tdev->drm->dev_private = NULL;
-	drm_dev_unref(tdev->drm);
+	drm_dev_put(tdev->drm);
 }
 
 static void devm_tinydrm_release(void *data)
@@ -172,7 +172,7 @@  static void devm_tinydrm_release(void *data)
  *
  * This function initializes @tdev, the underlying DRM device and it's
  * mode_config. Resources will be automatically freed on driver detach (devres)
- * using drm_mode_config_cleanup() and drm_dev_unref().
+ * using drm_mode_config_cleanup() and drm_dev_put().
  *
  * Returns:
  * Zero on success, negative error code on failure.