This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: v4l2-ctrl: Add new helper v4l2_ctrl_ptr_create
Author:  Ricardo Ribalda Delgado <riba...@kernel.org>
Date:    Mon Oct 7 12:06:35 2019 -0300

This helper function simplifies the code by not needing a union
v4l2_ctrl_ptr and an assignment every time we need to use
a ctrl_ptr.

Suggested-by: Hans Verkuil <hverkuil-ci...@xs4all.nl>
Signed-off-by: Ricardo Ribalda Delgado <riba...@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil-ci...@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+sams...@kernel.org>

 include/media/v4l2-ctrls.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

---

diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h
index c9ca867ef32b..26205ba3a0a0 100644
--- a/include/media/v4l2-ctrls.h
+++ b/include/media/v4l2-ctrls.h
@@ -74,6 +74,18 @@ union v4l2_ctrl_ptr {
 };
 
 /**
+ * v4l2_ctrl_ptr_create() - Helper function to return a v4l2_ctrl_ptr from a
+ * void pointer
+ * @ptr:       The void pointer
+ */
+static inline union v4l2_ctrl_ptr v4l2_ctrl_ptr_create(void *ptr)
+{
+       union v4l2_ctrl_ptr p = { .p = ptr };
+
+       return p;
+}
+
+/**
  * struct v4l2_ctrl_ops - The control operations that the driver has to 
provide.
  *
  * @g_volatile_ctrl: Get a new value for this control. Generally only relevant

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to