diff options
author | Aastha Gupta <aastha.gupta4104@gmail.com> | 2017-10-23 18:38:06 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-10-30 10:59:10 +0100 |
commit | 4e7b212075d9c4b71af9528bdaa81e642fab0e90 (patch) | |
tree | e830119f7c643f57b17a2d0294c053c150080022 /drivers/gpu/drm/virtio | |
parent | drm/gem: Remove trailing whitespace (diff) | |
download | linux-4e7b212075d9c4b71af9528bdaa81e642fab0e90.tar.xz linux-4e7b212075d9c4b71af9528bdaa81e642fab0e90.zip |
drm: virtio: replace reference/unreference with get/put
DRM core uses reference/unreference suffixes for refcounting
functions, but kernel uses get/put (e.g. kref_get/put()).
Replace reference/unreference with get/put for consistency
and also it's shorter.
The following cocci script was used to generate the patch:
@@
expression e;
@@
(
-drm_gem_object_reference(e);
+drm_gem_object_get(e);
|
-drm_gem_object_unreference(e);
+drm_gem_object_put(e);
|
-drm_gem_object_unreference_unlocked(e);
+drm_gem_object_put_unlocked(e);
)
Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1508776686-29664-1-git-send-email-aastha.gupta4104@gmail.com
Diffstat (limited to 'drivers/gpu/drm/virtio')
-rw-r--r-- | drivers/gpu/drm/virtio/virtgpu_ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_ioctl.c b/drivers/gpu/drm/virtio/virtgpu_ioctl.c index 0528edb4a2bf..461f81aa1bbe 100644 --- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c +++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c @@ -261,7 +261,7 @@ static int virtio_gpu_resource_create_ioctl(struct drm_device *dev, void *data, ret = virtio_gpu_object_attach(vgdev, qobj, res_id, NULL); } else { /* use a gem reference since unref list undoes them */ - drm_gem_object_reference(&qobj->gem_base); + drm_gem_object_get(&qobj->gem_base); mainbuf.bo = &qobj->tbo; list_add(&mainbuf.head, &validate_list); |