aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2007-01-19 22:30:23 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-02-21 10:34:40 -0500
commitc1c2680d922cd36338cf3efaf4ce0067c3e26eb1 (patch)
tree5764abf23a7a5112704018f7480d1a3605df4ca1
parentaf75453860569b6110fbf43c7113f52f698d37a3 (diff)
V4L/DVB (5089): Pvrusb2: V4L EXT_CTRLS fixup
Attempts to enumerate or operate on a group of EXT_CTRLS where the group size is zero is OK; don't fail on such operations. At least one application uses this to probe for the existence of this API so let it succeed. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-v4l2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
index 5b1260c5ff5b..91c422599877 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
@@ -636,6 +636,7 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file,
636 struct v4l2_ext_control *ctrl; 636 struct v4l2_ext_control *ctrl;
637 unsigned int idx; 637 unsigned int idx;
638 int val; 638 int val;
639 ret = 0;
639 for (idx = 0; idx < ctls->count; idx++) { 640 for (idx = 0; idx < ctls->count; idx++) {
640 ctrl = ctls->controls + idx; 641 ctrl = ctls->controls + idx;
641 ret = pvr2_ctrl_get_value( 642 ret = pvr2_ctrl_get_value(
@@ -658,6 +659,7 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file,
658 (struct v4l2_ext_controls *)arg; 659 (struct v4l2_ext_controls *)arg;
659 struct v4l2_ext_control *ctrl; 660 struct v4l2_ext_control *ctrl;
660 unsigned int idx; 661 unsigned int idx;
662 ret = 0;
661 for (idx = 0; idx < ctls->count; idx++) { 663 for (idx = 0; idx < ctls->count; idx++) {
662 ctrl = ctls->controls + idx; 664 ctrl = ctls->controls + idx;
663 ret = pvr2_ctrl_set_value( 665 ret = pvr2_ctrl_set_value(
@@ -680,6 +682,7 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file,
680 unsigned int idx; 682 unsigned int idx;
681 /* For the moment just validate that the requested control 683 /* For the moment just validate that the requested control
682 actually exists. */ 684 actually exists. */
685 ret = 0;
683 for (idx = 0; idx < ctls->count; idx++) { 686 for (idx = 0; idx < ctls->count; idx++) {
684 ctrl = ctls->controls + idx; 687 ctrl = ctls->controls + idx;
685 pctl = pvr2_hdw_get_ctrl_v4l(hdw,ctrl->id); 688 pctl = pvr2_hdw_get_ctrl_v4l(hdw,ctrl->id);