History

drm: introduce drm_dev_{get/put} functions

Reference counting functions in the kernel typically use get/put suffixes. For maintaining coding style consistency, introduce drm_dev_{get/put} functions. All callers of drm_dev_ref() API have been converted in this patch and hence it has been dropped while the drm_dev_unref() API with non-trivial number of users remains for compatibility. The semantic patch scripts/coccinelle/api/drm-get-put.cocci has been updated with the new helper for conversion of drm_dev_unref() to drm_dev_put()

Aishwarya Pant committed 9 years ago

Commit 9a96f551 parent f2a44dd4 files · +41 −22Browse files

Showing the changes to scripts (1 of 4 files). Show all

Unified · Split

scripts/coccinelle/api/drm-get-put.cocci+5−0
@@ -50,6 +50,9 @@ expression object; · 49 unmodified lines
5050 |
5151 - drm_property_unreference_blob(object)
5252 + drm_property_blob_put(object)
53+|
54+- drm_dev_unref(object)
55++ drm_dev_put(object)
5356 )
5457
5558 @r depends on report@
@@ -81,6 +84,8 @@ drm_gem_object_unreference_unlocked(object) · 25 unmodified lines
8184 drm_property_unreference_blob@p(object)
8285 |
8386 drm_property_reference_blob@p(object)
87+|
88+drm_dev_unref@p(object)
8489 )
8590
8691 @script:python depends on report@