summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_prime.c
diff options
context:
space:
mode:
authorEmil Velikov <emil.velikov@collabora.com>2020-05-15 11:50:53 +0200
committerEmil Velikov <emil.l.velikov@gmail.com>2020-05-19 23:31:31 +0200
commitbe6ee102341bc4d07e050dda119ecb91229bc654 (patch)
tree5937ff6341801e37b07c783cdcccd2e3fd6b23e1 /drivers/gpu/drm/drm_prime.c
parentdrm/gem: add drm_gem_object_put helper (diff)
downloadlinux-be6ee102341bc4d07e050dda119ecb91229bc654.tar.xz
linux-be6ee102341bc4d07e050dda119ecb91229bc654.zip
drm: remove _unlocked suffix in drm_gem_object_put_unlocked
Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Just drop the suffix. It makes the API cleaner. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done Pay special attention to the compat #define v2: keep sed and #define removal separate Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> (v1) Reviewed-by: Steven Price <steven.price@arm.com> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-14-emil.l.velikov@gmail.com
Diffstat (limited to 'drivers/gpu/drm/drm_prime.c')
-rw-r--r--drivers/gpu/drm/drm_prime.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c
index 282774e469ac..bbfc713bfdc3 100644
--- a/drivers/gpu/drm/drm_prime.c
+++ b/drivers/gpu/drm/drm_prime.c
@@ -270,7 +270,7 @@ void drm_gem_dmabuf_release(struct dma_buf *dma_buf)
struct drm_device *dev = obj->dev;
/* drop the reference on the export fd holds */
- drm_gem_object_put_unlocked(obj);
+ drm_gem_object_put(obj);
drm_dev_put(dev);
}
@@ -329,7 +329,7 @@ int drm_gem_prime_fd_to_handle(struct drm_device *dev,
/* _handle_create_tail unconditionally unlocks dev->object_name_lock. */
ret = drm_gem_handle_create_tail(file_priv, obj, handle);
- drm_gem_object_put_unlocked(obj);
+ drm_gem_object_put(obj);
if (ret)
goto out_put;
@@ -500,7 +500,7 @@ out_have_handle:
fail_put_dmabuf:
dma_buf_put(dmabuf);
out:
- drm_gem_object_put_unlocked(obj);
+ drm_gem_object_put(obj);
out_unlock:
mutex_unlock(&file_priv->prime.lock);