diff options
author | Cihangir Akturk <cakturk@gmail.com> | 2017-08-11 08:32:50 -0400 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2017-08-11 11:38:47 -0400 |
commit | 1feba03f726a8b8d36c8530430494e8ac1edf96a (patch) | |
tree | bc593fdac6e3ba0a2e6c6010c47c698e3be152b6 /drivers/gpu/drm/ast/ast_main.c | |
parent | 5bda902725928fc2eaf58380ab05c4c336aeacad (diff) |
drm/ast: 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>
Acked-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1502454794-28558-5-git-send-email-cakturk@gmail.com
Diffstat (limited to 'drivers/gpu/drm/ast/ast_main.c')
-rw-r--r-- | drivers/gpu/drm/ast/ast_main.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/ast/ast_main.c b/drivers/gpu/drm/ast/ast_main.c index 262c2c0e43b4..cb05e8e79eb9 100644 --- a/drivers/gpu/drm/ast/ast_main.c +++ b/drivers/gpu/drm/ast/ast_main.c | |||
@@ -387,7 +387,7 @@ static void ast_user_framebuffer_destroy(struct drm_framebuffer *fb) | |||
387 | { | 387 | { |
388 | struct ast_framebuffer *ast_fb = to_ast_framebuffer(fb); | 388 | struct ast_framebuffer *ast_fb = to_ast_framebuffer(fb); |
389 | 389 | ||
390 | drm_gem_object_unreference_unlocked(ast_fb->obj); | 390 | drm_gem_object_put_unlocked(ast_fb->obj); |
391 | drm_framebuffer_cleanup(fb); | 391 | drm_framebuffer_cleanup(fb); |
392 | kfree(fb); | 392 | kfree(fb); |
393 | } | 393 | } |
@@ -429,13 +429,13 @@ ast_user_framebuffer_create(struct drm_device *dev, | |||
429 | 429 | ||
430 | ast_fb = kzalloc(sizeof(*ast_fb), GFP_KERNEL); | 430 | ast_fb = kzalloc(sizeof(*ast_fb), GFP_KERNEL); |
431 | if (!ast_fb) { | 431 | if (!ast_fb) { |
432 | drm_gem_object_unreference_unlocked(obj); | 432 | drm_gem_object_put_unlocked(obj); |
433 | return ERR_PTR(-ENOMEM); | 433 | return ERR_PTR(-ENOMEM); |
434 | } | 434 | } |
435 | 435 | ||
436 | ret = ast_framebuffer_init(dev, ast_fb, mode_cmd, obj); | 436 | ret = ast_framebuffer_init(dev, ast_fb, mode_cmd, obj); |
437 | if (ret) { | 437 | if (ret) { |
438 | drm_gem_object_unreference_unlocked(obj); | 438 | drm_gem_object_put_unlocked(obj); |
439 | kfree(ast_fb); | 439 | kfree(ast_fb); |
440 | return ERR_PTR(ret); | 440 | return ERR_PTR(ret); |
441 | } | 441 | } |
@@ -627,7 +627,7 @@ int ast_dumb_create(struct drm_file *file, | |||
627 | return ret; | 627 | return ret; |
628 | 628 | ||
629 | ret = drm_gem_handle_create(file, gobj, &handle); | 629 | ret = drm_gem_handle_create(file, gobj, &handle); |
630 | drm_gem_object_unreference_unlocked(gobj); | 630 | drm_gem_object_put_unlocked(gobj); |
631 | if (ret) | 631 | if (ret) |
632 | return ret; | 632 | return ret; |
633 | 633 | ||
@@ -675,7 +675,7 @@ ast_dumb_mmap_offset(struct drm_file *file, | |||
675 | bo = gem_to_ast_bo(obj); | 675 | bo = gem_to_ast_bo(obj); |
676 | *offset = ast_bo_mmap_offset(bo); | 676 | *offset = ast_bo_mmap_offset(bo); |
677 | 677 | ||
678 | drm_gem_object_unreference_unlocked(obj); | 678 | drm_gem_object_put_unlocked(obj); |
679 | 679 | ||
680 | return 0; | 680 | return 0; |
681 | 681 | ||