summaryrefslogtreecommitdiff
path: root/include/media
diff options
context:
space:
mode:
authorRicardo Ribalda <ribalda@chromium.org>2025-02-23 18:58:14 +0000
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2025-03-05 10:43:26 +0100
commit6494d3504cb0f9715375ac436b7e690f05684525 (patch)
tree8187cb42b336cc7131765d3fb9091a6088d0258a /include/media
parent0d75129312ff59280c053b36e098c3ec89110ebb (diff)
downloadlinux-6494d3504cb0f9715375ac436b7e690f05684525.tar.gz
linux-6494d3504cb0f9715375ac436b7e690f05684525.tar.bz2
linux-6494d3504cb0f9715375ac436b7e690f05684525.zip
media: v4l2-core: Introduce v4l2_query_ext_ctrl_to_v4l2_queryctrl
We use this logic in a couple of places. Refactor into a function. No functional change expected from this patch. Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/v4l2-ctrls.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h
index 9ed7be1e696f..3a87096e064f 100644
--- a/include/media/v4l2-ctrls.h
+++ b/include/media/v4l2-ctrls.h
@@ -1433,6 +1433,18 @@ v4l2_ctrl_request_hdl_ctrl_find(struct v4l2_ctrl_handler *hdl, u32 id);
int v4l2_queryctrl(struct v4l2_ctrl_handler *hdl, struct v4l2_queryctrl *qc);
/**
+ * v4l2_query_ext_ctrl_to_v4l2_queryctrl - Convert a qec to qe.
+ *
+ * @to: The v4l2_queryctrl to write to.
+ * @from: The v4l2_query_ext_ctrl to read from.
+ *
+ * This function is a helper to convert a v4l2_query_ext_ctrl into a
+ * v4l2_queryctrl.
+ */
+void v4l2_query_ext_ctrl_to_v4l2_queryctrl(struct v4l2_queryctrl *to,
+ const struct v4l2_query_ext_ctrl *from);
+
+/**
* v4l2_query_ext_ctrl - Helper function to implement
* :ref:`VIDIOC_QUERY_EXT_CTRL <vidioc_queryctrl>` ioctl
*