]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - include/drm/ttm/ttm_bo_driver.h
Merge branches 'pm-core', 'pm-qos', 'pm-domains' and 'pm-opp'
[linux.git] / include / drm / ttm / ttm_bo_driver.h
index cdbdb40eb5bd3a83d1a2ea594c0de3efa9226c02..feecf33a1212279d19eee8d0dfd266be3ed99351 100644 (file)
@@ -878,7 +878,7 @@ static inline int ttm_bo_reserve(struct ttm_buffer_object *bo,
 {
        int ret;
 
-       WARN_ON(!atomic_read(&bo->kref.refcount));
+       WARN_ON(!kref_read(&bo->kref));
 
        ret = __ttm_bo_reserve(bo, interruptible, no_wait, ticket);
        if (likely(ret == 0))
@@ -903,7 +903,7 @@ static inline int ttm_bo_reserve_slowpath(struct ttm_buffer_object *bo,
 {
        int ret = 0;
 
-       WARN_ON(!atomic_read(&bo->kref.refcount));
+       WARN_ON(!kref_read(&bo->kref));
 
        if (interruptible)
                ret = ww_mutex_lock_slow_interruptible(&bo->resv->lock,