All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] v4l2-compat-ioctl32.c: add missing controls to, ctrl_is_pointer
@ 2017-08-04 11:25 Hans Verkuil
  2017-08-10 23:45 ` [PATCH 0/3] v4l2-compat-ioctl32.c: better detect pointer controls Mauro Carvalho Chehab
  2017-08-11  0:16 ` [PATCH RESEND " Mauro Carvalho Chehab
  0 siblings, 2 replies; 18+ messages in thread
From: Hans Verkuil @ 2017-08-04 11:25 UTC (permalink / raw)
  To: Linux Media Mailing List

We need to find a better method for this. But for now just add
the missing pointer controls to this list.

Also properly mask the id. The high flag bits shouldn't be used
with these ioctls, but it certainly doesn't hurt.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
 drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
index 90827073066f..afae914b8099 100644
--- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
+++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
@@ -674,9 +674,14 @@ struct v4l2_ext_control32 {
    type STRING is a pointer type. */
 static inline int ctrl_is_pointer(u32 id)
 {
-	switch (id) {
+	switch (id & V4L2_CTRL_ID_MASK) {
 	case V4L2_CID_RDS_TX_PS_NAME:
 	case V4L2_CID_RDS_TX_RADIO_TEXT:
+	case V4L2_CID_RDS_RX_PS_NAME:
+	case V4L2_CID_RDS_RX_RADIO_TEXT:
+	case V4L2_CID_DETECT_MD_REGION_GRID:
+	case V4L2_CID_DETECT_MD_THRESHOLD_GRID:
+	case V4L2_CID_RDS_TX_ALT_FREQS:
 		return 1;
 	default:
 		return 0;
-- 
2.13.2

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2017-08-12  9:57 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-04 11:25 [PATCH] v4l2-compat-ioctl32.c: add missing controls to, ctrl_is_pointer Hans Verkuil
2017-08-10 23:45 ` [PATCH 0/3] v4l2-compat-ioctl32.c: better detect pointer controls Mauro Carvalho Chehab
2017-08-10 23:45   ` [PATCH 1/3] media: v4l2-ctrls.h: better document the arguments for v4l2_ctrl_fill Mauro Carvalho Chehab
2017-08-10 23:45   ` [PATCH 2/3] media: v4l2-ctrls: prepare the function to be used by compat32 code Mauro Carvalho Chehab
2017-08-10 23:45   ` [PATCH 3/3] media: compat32: reimplement ctrl_is_pointer() Mauro Carvalho Chehab
2017-08-10 23:52   ` [PATCH 0/3] v4l2-compat-ioctl32.c: better detect pointer controls Mauro Carvalho Chehab
2017-08-11  0:16 ` [PATCH RESEND " Mauro Carvalho Chehab
2017-08-11  0:16   ` [PATCH 1/3] media: v4l2-ctrls.h: better document the arguments for v4l2_ctrl_fill Mauro Carvalho Chehab
2017-08-11  6:01     ` Hans Verkuil
2017-08-11  9:10       ` Mauro Carvalho Chehab
2017-08-11  9:35         ` Hans Verkuil
2017-08-12  9:57           ` [PATCH v3] " Mauro Carvalho Chehab
2017-08-11  0:16   ` [PATCH 2/3] media: v4l2-ctrls: prepare the function to be used by compat32 code Mauro Carvalho Chehab
2017-08-11  0:16   ` [PATCH 3/3] media: compat32: reimplement ctrl_is_pointer() Mauro Carvalho Chehab
2017-08-11  6:05   ` [PATCH RESEND 0/3] v4l2-compat-ioctl32.c: better detect pointer controls Hans Verkuil
2017-08-11  9:00     ` Mauro Carvalho Chehab
2017-08-11  9:24       ` Hans Verkuil
2017-08-11  9:46     ` Laurent Pinchart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.