diff options
author | Emil Velikov <emil.velikov@collabora.com> | 2020-05-15 10:50:51 +0100 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2020-05-19 22:31:30 +0100 |
commit | eecd7fd8bf58d5d59f948d2655e41760d7cf17d9 (patch) | |
tree | d0d0406a1ef024c85124d3088d9ce2fb98234e6b /include/drm/drm_gem.h | |
parent | b5d250744cccfb40024de663ea1f4da04e6d959c (diff) | |
download | linux-eecd7fd8bf58d5d59f948d2655e41760d7cf17d9.tar.bz2 |
drm/gem: add _locked suffix to drm_gem_object_put
Vast majority of DRM (core and drivers) are struct_mutex free.
As such we have only a handful of cases where the locked helper should
be used. Make that stand out a little bit better.
Done via the following script:
__from=drm_gem_object_put
__to=drm_gem_object_put_locked
for __file in $(git grep --name-only --word-regexp $__from); do
sed -i "s/\<$__from\>/$__to/g" $__file;
done
Cc: Rob Clark <robdclark@gmail.com>
Cc: Sean Paul <sean@poorly.run>
Cc: linux-arm-msm@vger.kernel.org
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Steven Price <steven.price@arm.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-12-emil.l.velikov@gmail.com
Diffstat (limited to 'include/drm/drm_gem.h')
-rw-r--r-- | include/drm/drm_gem.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/drm/drm_gem.h b/include/drm/drm_gem.h index c3bdade093ae..a231a2b3f5ac 100644 --- a/include/drm/drm_gem.h +++ b/include/drm/drm_gem.h @@ -187,7 +187,7 @@ struct drm_gem_object { * * Reference count of this object * - * Please use drm_gem_object_get() to acquire and drm_gem_object_put() + * Please use drm_gem_object_get() to acquire and drm_gem_object_put_locked() * or drm_gem_object_put_unlocked() to release a reference to a GEM * buffer object. */ @@ -375,7 +375,7 @@ drm_gem_object_put_unlocked(struct drm_gem_object *obj) kref_put(&obj->refcount, drm_gem_object_free); } -void drm_gem_object_put(struct drm_gem_object *obj); +void drm_gem_object_put_locked(struct drm_gem_object *obj); int drm_gem_handle_create(struct drm_file *file_priv, struct drm_gem_object *obj, |