summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/v4l2-ioctl.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-08-11 23:47:18 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-08-11 23:47:18 +0200
commit4be4cfbd5a49c25a5d4fb78aed2e1246415ac7aa (patch)
treef9277da3c479dc7618aa44ed1aeb5d9bb471fe4b /linux/drivers/media/video/v4l2-ioctl.c
parentd20c7e6a12b8c15e0574c2cb7599ce6195684bd0 (diff)
downloadmediapointer-dvb-s2-4be4cfbd5a49c25a5d4fb78aed2e1246415ac7aa.tar.gz
mediapointer-dvb-s2-4be4cfbd5a49c25a5d4fb78aed2e1246415ac7aa.tar.bz2
v4l: introduce string control support.
From: Hans Verkuil <hverkuil@xs4all.nl> The upcoming RDS encoder needs support for string controls. This patch implements the core implementation. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/v4l2-ioctl.c')
-rw-r--r--linux/drivers/media/video/v4l2-ioctl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/linux/drivers/media/video/v4l2-ioctl.c b/linux/drivers/media/video/v4l2-ioctl.c
index d746d9555..d40c7bb2d 100644
--- a/linux/drivers/media/video/v4l2-ioctl.c
+++ b/linux/drivers/media/video/v4l2-ioctl.c
@@ -514,11 +514,12 @@ static inline void v4l_print_ext_ctrls(unsigned int cmd,
dbgarg(cmd, "");
printk(KERN_CONT "class=0x%x", c->ctrl_class);
for (i = 0; i < c->count; i++) {
- if (show_vals)
+ if (show_vals && !c->controls[i].size)
printk(KERN_CONT " id/val=0x%x/0x%x",
c->controls[i].id, c->controls[i].value);
else
- printk(KERN_CONT " id=0x%x", c->controls[i].id);
+ printk(KERN_CONT " id=0x%x,size=%u",
+ c->controls[i].id, c->controls[i].size);
}
printk(KERN_CONT "\n");
};
@@ -529,10 +530,9 @@ static inline int check_ext_ctrls(struct v4l2_ext_controls *c, int allow_priv)
/* zero the reserved fields */
c->reserved[0] = c->reserved[1] = 0;
- for (i = 0; i < c->count; i++) {
+ for (i = 0; i < c->count; i++)
c->controls[i].reserved2[0] = 0;
- c->controls[i].reserved2[1] = 0;
- }
+
/* V4L2_CID_PRIVATE_BASE cannot be used as control class
when using extended controls.
Only when passed in through VIDIOC_G_CTRL and VIDIOC_S_CTRL