From a4a69da06bc11a937a6e417938b1bb698ee1fa46 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Tue, 28 Feb 2017 15:46:40 +0100 Subject: drm: Introduce drm_framebuffer_{get,put}() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For consistency with other reference counting APIs in the kernel, add drm_framebuffer_get() and drm_framebuffer_put() to reference count DRM framebuffers. Compatibility aliases are added to keep existing code working. To help speed up the transition, all the instances of the old functions in the DRM core are already replaced in this commit. The existing semantic patch for the DRM subsystem-wide conversion is extended to account for these new helpers. Reviewed-by: Sean Paul Acked-by: Christian König Signed-off-by: Thierry Reding Link: http://patchwork.freedesktop.org/patch/msgid/20170228144643.5668-5-thierry.reding@gmail.com --- scripts/coccinelle/api/drm-get-put.cocci | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'scripts/coccinelle') diff --git a/scripts/coccinelle/api/drm-get-put.cocci b/scripts/coccinelle/api/drm-get-put.cocci index 8a4c2cb7889e..fd298c24a465 100644 --- a/scripts/coccinelle/api/drm-get-put.cocci +++ b/scripts/coccinelle/api/drm-get-put.cocci @@ -26,6 +26,12 @@ expression object; | - drm_connector_unreference(object) + drm_connector_put(object) +| +- drm_framebuffer_reference(object) ++ drm_framebuffer_get(object) +| +- drm_framebuffer_unreference(object) ++ drm_framebuffer_put(object) ) @r depends on report@ @@ -41,6 +47,10 @@ drm_mode_object_reference@p(object) drm_connector_unreference@p(object) | drm_connector_reference@p(object) +| +drm_framebuffer_unreference@p(object) +| +drm_framebuffer_reference@p(object) ) @script:python depends on report@ -- cgit