From f46640b931e588aeec5285b4a9547b354ad10cd0 Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Mon, 4 Sep 2017 12:48:36 +0200 Subject: drm/atomic: Return commit in drm_crtc_commit_get for better annotation This will allow code to do x->commit = drm_crtc_commit_get(commit), making it clearer where references are used. Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20170904104838.23822-5-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter --- include/drm/drm_atomic.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/drm/drm_atomic.h') diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h index f73b663c1f76..c0451e2a51af 100644 --- a/include/drm/drm_atomic.h +++ b/include/drm/drm_atomic.h @@ -252,10 +252,14 @@ void __drm_crtc_commit_free(struct kref *kref); * @commit: CRTC commit * * Increases the reference of @commit. + * + * Returns: + * The pointer to @commit, with reference increased. */ -static inline void drm_crtc_commit_get(struct drm_crtc_commit *commit) +static inline struct drm_crtc_commit *drm_crtc_commit_get(struct drm_crtc_commit *commit) { kref_get(&commit->ref); + return commit; } /** -- cgit v1.2.3-55-g7522