Skip to content

Commit 6a98a6e

Browse files
Brandon Pollackatseanpaul
authored andcommitted
Documentation: vkms: clarify devres managed reference cleanup
added documentation to drm_dev_unregister clarifying that devres managed devices allocated with devm_drm_dev_alloc do not require calls to drm_dev_put. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Brandon Pollack <brpol@chromium.org> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20230425080240.3582324-1-brpol@chromium.org
1 parent 0440895 commit 6a98a6e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/gpu/drm/drm_drv.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,9 @@ EXPORT_SYMBOL(drm_dev_register);
969969
*
970970
* Unregister the DRM device from the system. This does the reverse of
971971
* drm_dev_register() but does not deallocate the device. The caller must call
972-
* drm_dev_put() to drop their final reference.
972+
* drm_dev_put() to drop their final reference, unless it is managed with devres
973+
* (as devices allocated with devm_drm_dev_alloc() are), in which case there is
974+
* already an unwind action registered.
973975
*
974976
* A special form of unregistering for hotpluggable devices is drm_dev_unplug(),
975977
* which can be called while there are still open users of @dev.

0 commit comments

Comments
 (0)