[PATCH v12 36/86] media: v4l2-ctrl: Improve v4l2_ctrl_g_ctrl{,int64} documentation

Sakari Ailus
2026-04-09T20:15:34Z

Improve documentation of v4l2_ctrl_g_ctrl() and v4l2_ctrl_g_ctrl_int64()
by documenting what the function returns on error (i.e. 0).

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
include/media/v4l2-ctrls.h | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h
index 327976b14d50..183683b6add8 100644
--- a/include/media/v4l2-ctrls.h
+++ b/include/media/v4l2-ctrls.h
@@ -1105,6 +1105,8 @@ const s64 *v4l2_ctrl_get_int_menu(u32 id, u32 *len);
* used from within the &v4l2_ctrl_ops functions.
*
* This function is for integer type controls only.
+ *
+ * Returns: the value of the control or 0 on error.
*/
s32 v4l2_ctrl_g_ctrl(struct v4l2_ctrl *ctrl);

@@ -1156,6 +1158,8 @@ static inline int v4l2_ctrl_s_ctrl(struct v4l2_ctrl *ctrl, s32 val)
* used from within the &v4l2_ctrl_ops functions.
*
* This function is for 64-bit integer type controls only.
+ *
+ * Returns: the value of the control or 0 on error.
*/
s64 v4l2_ctrl_g_ctrl_int64(struct v4l2_ctrl *ctrl);

--
2.47.3