]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Introduce drm_mode_object_{get,put}()
authorThierry Reding <treding@nvidia.com>
Tue, 28 Feb 2017 14:46:38 +0000 (15:46 +0100)
committerThierry Reding <treding@nvidia.com>
Tue, 28 Feb 2017 15:14:55 +0000 (16:14 +0100)
commit9ac4ec7036c0b5c798f54e2a4037424a30a355ce
tree343a200b9e4373a380dad7d00dd26fb90a8338e1
parenta508b388048a2c7f66908ec03a25d7c8a82d5703
drm: Introduce drm_mode_object_{get,put}()

For consistency with other reference counting APIs in the kernel, add
drm_mode_object_get() and drm_mode_object_put() to reference count DRM
mode objects.

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.

A semantic patch is provided that can be used to convert all drivers to
the 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-3-thierry.reding@gmail.com
drivers/gpu/drm/drm_atomic.c
drivers/gpu/drm/drm_mode_object.c
drivers/gpu/drm/drm_property.c
include/drm/drm_mode_object.h
scripts/coccinelle/api/drm-get-put.cocci [new file with mode: 0644]