Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/connector: add ref to drm_connector_get in iter docs

Mention that connectors need to be referenced manually if they are
to be accessed after the iteration has progressed or ended.

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/KRoUI7OC9lRIvk3YzdGm6tcMVAVlG1fR78Ll7kTZZT4@cp3-web-051.plabs.ch

+5
+5
include/drm/drm_connector.h
··· 1740 1740 * drm_connector_list_iter_begin(), drm_connector_list_iter_end() and 1741 1741 * drm_connector_list_iter_next() respectively the convenience macro 1742 1742 * drm_for_each_connector_iter(). 1743 + * 1744 + * Note that the return value of drm_connector_list_iter_next() is only valid 1745 + * up to the next drm_connector_list_iter_next() or 1746 + * drm_connector_list_iter_end() call. If you want to use the connector later, 1747 + * then you need to grab your own reference first using drm_connector_get(). 1743 1748 */ 1744 1749 struct drm_connector_list_iter { 1745 1750 /* private: */