diff options
author | Cihangir Akturk <cakturk@gmail.com> | 2017-08-11 15:33:14 +0300 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2017-08-11 11:34:07 -0400 |
commit | c58ac649e3553c23a9bafba8c2e5d040aee87484 (patch) | |
tree | 49898511d38b98e2122040aa94f5bf486024a8e0 /drivers/staging/vboxvideo/vbox_main.c | |
parent | 0469901ea4beaa4a326ffcc9b1d6b5baf9738a42 (diff) | |
download | op-kernel-dev-c58ac649e3553c23a9bafba8c2e5d040aee87484.zip op-kernel-dev-c58ac649e3553c23a9bafba8c2e5d040aee87484.tar.gz |
drm: vboxvideo: switch to drm_*_get(), drm_*_put() helpers
Use drm_*_get() and drm_*_put() helpers instead of drm_*_reference()
and drm_*_unreference() helpers.
drm_*_reference() and drm_*_unreference() functions are just
compatibility alias for drm_*_get() and drm_*_put() and should not be
used by new code. So convert all users of compatibility functions to
use the new APIs.
Generated by: scripts/coccinelle/api/drm-get-put.cocci
Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1502454794-28558-29-git-send-email-cakturk@gmail.com
Diffstat (limited to 'drivers/staging/vboxvideo/vbox_main.c')
-rw-r--r-- | drivers/staging/vboxvideo/vbox_main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/vboxvideo/vbox_main.c b/drivers/staging/vboxvideo/vbox_main.c index d0c6ec7..80bd039 100644 --- a/drivers/staging/vboxvideo/vbox_main.c +++ b/drivers/staging/vboxvideo/vbox_main.c @@ -40,7 +40,7 @@ static void vbox_user_framebuffer_destroy(struct drm_framebuffer *fb) struct vbox_framebuffer *vbox_fb = to_vbox_framebuffer(fb); if (vbox_fb->obj) - drm_gem_object_unreference_unlocked(vbox_fb->obj); + drm_gem_object_put_unlocked(vbox_fb->obj); drm_framebuffer_cleanup(fb); kfree(fb); @@ -198,7 +198,7 @@ static struct drm_framebuffer *vbox_user_framebuffer_create( err_free_vbox_fb: kfree(vbox_fb); err_unref_obj: - drm_gem_object_unreference_unlocked(obj); + drm_gem_object_put_unlocked(obj); return ERR_PTR(ret); } @@ -472,7 +472,7 @@ int vbox_dumb_create(struct drm_file *file, return ret; ret = drm_gem_handle_create(file, gobj, &handle); - drm_gem_object_unreference_unlocked(gobj); + drm_gem_object_put_unlocked(gobj); if (ret) return ret; @@ -525,7 +525,7 @@ vbox_dumb_mmap_offset(struct drm_file *file, bo = gem_to_vbox_bo(obj); *offset = vbox_bo_mmap_offset(bo); - drm_gem_object_unreference(obj); + drm_gem_object_put(obj); ret = 0; out_unlock: |