diff options
author | Thierry Reding <treding@nvidia.com> | 2017-02-28 15:46:39 +0100 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2017-02-28 16:15:00 +0100 |
commit | ad09360750afa18a0a0ce0253d6ea6033abc22e7 (patch) | |
tree | 6d8c896081f454417a5cdc0f0eee9cfc8f07050c /scripts/coccinelle | |
parent | 020a218f95bd3ceff7dd1022ff7ebc0497bc7bf9 (diff) |
drm: Introduce drm_connector_{get,put}()
For consistency with other reference counting APIs in the kernel, add
drm_connector_get() and drm_connector_put() functions to reference count
connectors.
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 mode object reference count conversion
is extended for these new helpers.
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170228144643.5668-4-thierry.reding@gmail.com
Diffstat (limited to 'scripts/coccinelle')
-rw-r--r-- | scripts/coccinelle/api/drm-get-put.cocci | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/coccinelle/api/drm-get-put.cocci b/scripts/coccinelle/api/drm-get-put.cocci index a3742447c981..8a4c2cb7889e 100644 --- a/scripts/coccinelle/api/drm-get-put.cocci +++ b/scripts/coccinelle/api/drm-get-put.cocci @@ -20,6 +20,12 @@ expression object; | - drm_mode_object_unreference(object) + drm_mode_object_put(object) +| +- drm_connector_reference(object) ++ drm_connector_get(object) +| +- drm_connector_unreference(object) ++ drm_connector_put(object) ) @r depends on report@ @@ -31,6 +37,10 @@ position p; drm_mode_object_unreference@p(object) | drm_mode_object_reference@p(object) +| +drm_connector_unreference@p(object) +| +drm_connector_reference@p(object) ) @script:python depends on report@ |