diff mbox series

[1/3] media: v4l: Support obtaining link frequency from INTEGER64 controls

Message ID 20240220130339.543749-2-sakari.ailus@linux.intel.com
State New
Headers show
Series Use INTEGER64 type for MEI CSI LINK_FREQ control | expand

Commit Message

Sakari Ailus Feb. 20, 2024, 1:03 p.m. UTC
Support INTEGER64 controls in v4l2_get_link_freq().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/media/v4l2-core/v4l2-common.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/drivers/media/v4l2-core/v4l2-common.c b/drivers/media/v4l2-core/v4l2-common.c
index 273d83de2a87..8e2fd81b7edf 100644
--- a/drivers/media/v4l2-core/v4l2-common.c
+++ b/drivers/media/v4l2-core/v4l2-common.c
@@ -473,6 +473,9 @@  s64 v4l2_get_link_freq(struct v4l2_ctrl_handler *handler, unsigned int mul,
 		struct v4l2_querymenu qm = { .id = V4L2_CID_LINK_FREQ };
 		int ret;
 
+		if (ctrl->type == V4L2_CTRL_TYPE_INTEGER64)
+			return v4l2_ctrl_g_ctrl_int64(ctrl);
+
 		qm.index = v4l2_ctrl_g_ctrl(ctrl);
 
 		ret = v4l2_querymenu(handler, &qm);