Skip to content

Commit

Permalink
drm/exynos: Replace drm_gem_object_unreference_unlocked with put func…
Browse files Browse the repository at this point in the history
…tion

This patch unifies the naming of DRM functions for reference counting
of struct drm_gem_object. The resulting code is more aligned with the
rest of the Linux kernel interfaces.

Signed-off-by: Thomas Zimmermann <tdz@users.sourceforge.net>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
  • Loading branch information
Thomas Zimmermann authored and Inki Dae committed Jul 2, 2018
1 parent fa7743b commit af7d910
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/exynos/exynos_drm_fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ exynos_user_fb_create(struct drm_device *dev, struct drm_file *file_priv,

err:
while (i--)
drm_gem_object_unreference_unlocked(&exynos_gem[i]->base);
drm_gem_object_put_unlocked(&exynos_gem[i]->base);

return ERR_PTR(ret);
}
Expand Down
10 changes: 5 additions & 5 deletions drivers/gpu/drm/exynos/exynos_drm_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ static int exynos_drm_gem_handle_create(struct drm_gem_object *obj,
DRM_DEBUG_KMS("gem handle = 0x%x\n", *handle);

/* drop reference from allocate - handle holds it now. */
drm_gem_object_unreference_unlocked(obj);
drm_gem_object_put_unlocked(obj);

return 0;
}
Expand Down Expand Up @@ -186,7 +186,7 @@ unsigned long exynos_drm_gem_get_size(struct drm_device *dev,

exynos_gem = to_exynos_gem(obj);

drm_gem_object_unreference_unlocked(obj);
drm_gem_object_put_unlocked(obj);

return exynos_gem->size;
}
Expand Down Expand Up @@ -329,13 +329,13 @@ void exynos_drm_gem_put_dma_addr(struct drm_device *dev,
return;
}

drm_gem_object_unreference_unlocked(obj);
drm_gem_object_put_unlocked(obj);

/*
* decrease obj->refcount one more time because we has already
* increased it at exynos_drm_gem_get_dma_addr().
*/
drm_gem_object_unreference_unlocked(obj);
drm_gem_object_put_unlocked(obj);
}

static int exynos_drm_gem_mmap_buffer(struct exynos_drm_gem *exynos_gem,
Expand Down Expand Up @@ -383,7 +383,7 @@ int exynos_drm_gem_get_ioctl(struct drm_device *dev, void *data,
args->flags = exynos_gem->flags;
args->size = exynos_gem->size;

drm_gem_object_unreference_unlocked(obj);
drm_gem_object_put_unlocked(obj);

return 0;
}
Expand Down

0 comments on commit af7d910

Please sign in to comment.