[PATCH] drm/amdgpu: fix drm-get-put.cocci warnings

From: Julia Lawall
Date: Wed Jun 07 2017 - 04:14:44 EST


Use drm_*_get() and drm_*_put() helpers instead of drm_*_reference() and
drm_*_unreference() helpers.

Generated by: scripts/coccinelle/api/drm-get-put.cocci

CC: Christian König <christian.koenig@xxxxxxx>
Signed-off-by: Julia Lawall <julia.lawall@xxxxxxx>
Signed-off-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
---

Please take the patch only if it's a positive warning. Thanks!

amdgpu_prime.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
@@ -173,7 +173,7 @@ amdgpu_gem_prime_foreign_bo(struct amdgp
continue;

ww_mutex_unlock(&bo->tbo.resv->lock);
- drm_gem_object_reference(&gobj->base);
+ drm_gem_object_get(&gobj->base);
return &gobj->base;
}