Commit 4a66af0d authored by Cihangir Akturk's avatar Cihangir Akturk Committed by Greg Kroah-Hartman

staging: vboxvideo: switch to drm_*{get,put} helpers

drm_*_reference() and drm_*_unreference() functions are just
compatibility alias for drm_*_get() and drm_*_put() adn should not be
used by new code. So convert all users of compatibility functions to use
the new APIs.
Signed-off-by: default avatarCihangir Akturk <cakturk@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 227fe242
...@@ -358,7 +358,7 @@ void vbox_fbdev_fini(struct drm_device *dev) ...@@ -358,7 +358,7 @@ void vbox_fbdev_fini(struct drm_device *dev)
vbox_bo_unpin(bo); vbox_bo_unpin(bo);
vbox_bo_unreserve(bo); vbox_bo_unreserve(bo);
} }
drm_gem_object_unreference_unlocked(afb->obj); drm_gem_object_put_unlocked(afb->obj);
afb->obj = NULL; afb->obj = NULL;
} }
drm_fb_helper_fini(&fbdev->helper); drm_fb_helper_fini(&fbdev->helper);
......
...@@ -40,7 +40,7 @@ static void vbox_user_framebuffer_destroy(struct drm_framebuffer *fb) ...@@ -40,7 +40,7 @@ static void vbox_user_framebuffer_destroy(struct drm_framebuffer *fb)
struct vbox_framebuffer *vbox_fb = to_vbox_framebuffer(fb); struct vbox_framebuffer *vbox_fb = to_vbox_framebuffer(fb);
if (vbox_fb->obj) if (vbox_fb->obj)
drm_gem_object_unreference_unlocked(vbox_fb->obj); drm_gem_object_put_unlocked(vbox_fb->obj);
drm_framebuffer_cleanup(fb); drm_framebuffer_cleanup(fb);
kfree(fb); kfree(fb);
...@@ -198,7 +198,7 @@ static struct drm_framebuffer *vbox_user_framebuffer_create( ...@@ -198,7 +198,7 @@ static struct drm_framebuffer *vbox_user_framebuffer_create(
err_free_vbox_fb: err_free_vbox_fb:
kfree(vbox_fb); kfree(vbox_fb);
err_unref_obj: err_unref_obj:
drm_gem_object_unreference_unlocked(obj); drm_gem_object_put_unlocked(obj);
return ERR_PTR(ret); return ERR_PTR(ret);
} }
...@@ -472,7 +472,7 @@ int vbox_dumb_create(struct drm_file *file, ...@@ -472,7 +472,7 @@ int vbox_dumb_create(struct drm_file *file,
return ret; return ret;
ret = drm_gem_handle_create(file, gobj, &handle); ret = drm_gem_handle_create(file, gobj, &handle);
drm_gem_object_unreference_unlocked(gobj); drm_gem_object_put_unlocked(gobj);
if (ret) if (ret)
return ret; return ret;
...@@ -525,7 +525,7 @@ vbox_dumb_mmap_offset(struct drm_file *file, ...@@ -525,7 +525,7 @@ vbox_dumb_mmap_offset(struct drm_file *file,
bo = gem_to_vbox_bo(obj); bo = gem_to_vbox_bo(obj);
*offset = vbox_bo_mmap_offset(bo); *offset = vbox_bo_mmap_offset(bo);
drm_gem_object_unreference(obj); drm_gem_object_put(obj);
ret = 0; ret = 0;
out_unlock: out_unlock:
......
...@@ -812,7 +812,7 @@ static int vbox_cursor_set2(struct drm_crtc *crtc, struct drm_file *file_priv, ...@@ -812,7 +812,7 @@ static int vbox_cursor_set2(struct drm_crtc *crtc, struct drm_file *file_priv,
out_unreserve_bo: out_unreserve_bo:
vbox_bo_unreserve(bo); vbox_bo_unreserve(bo);
out_unref_obj: out_unref_obj:
drm_gem_object_unreference_unlocked(obj); drm_gem_object_put_unlocked(obj);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment