mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-17 10:26:09 +00:00
drm/gem: remove drm_gem_object_handle_unreference
It's unused, everyone is using the _unlocked variant only. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Dave Airlie <airlied@gmail.com>
This commit is contained in:
parent
c3911624f9
commit
da5cbe361c
@ -1648,24 +1648,6 @@ drm_gem_object_handle_reference(struct drm_gem_object *obj)
|
|||||||
atomic_inc(&obj->handle_count);
|
atomic_inc(&obj->handle_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
|
||||||
drm_gem_object_handle_unreference(struct drm_gem_object *obj)
|
|
||||||
{
|
|
||||||
if (obj == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (atomic_read(&obj->handle_count) == 0)
|
|
||||||
return;
|
|
||||||
/*
|
|
||||||
* Must bump handle count first as this may be the last
|
|
||||||
* ref, in which case the object would disappear before we
|
|
||||||
* checked for a name
|
|
||||||
*/
|
|
||||||
if (atomic_dec_and_test(&obj->handle_count))
|
|
||||||
drm_gem_object_handle_free(obj);
|
|
||||||
drm_gem_object_unreference(obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
drm_gem_object_handle_unreference_unlocked(struct drm_gem_object *obj)
|
drm_gem_object_handle_unreference_unlocked(struct drm_gem_object *obj)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user