From 0d3215e3857ab679f74c9b26b7e711955c9d0438 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Wed, 19 Mar 2014 13:23:20 +0100 Subject: drm/ttm: Add a ttm_ref_object_exists function A function to be used to check whether a caller has put a ref object (opened) a struct ttm_base_object Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul --- include/drm/ttm/ttm_object.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/drm') diff --git a/include/drm/ttm/ttm_object.h b/include/drm/ttm/ttm_object.h index 0097cc03034e..ed953f98f0e1 100644 --- a/include/drm/ttm/ttm_object.h +++ b/include/drm/ttm/ttm_object.h @@ -244,6 +244,10 @@ extern void ttm_base_object_unref(struct ttm_base_object **p_base); extern int ttm_ref_object_add(struct ttm_object_file *tfile, struct ttm_base_object *base, enum ttm_ref_type ref_type, bool *existed); + +extern bool ttm_ref_object_exists(struct ttm_object_file *tfile, + struct ttm_base_object *base); + /** * ttm_ref_object_base_unref * -- cgit v1.2.3