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>
This commit is contained in:
parent
af75453860
commit
c1c2680d92
1 changed files with 3 additions and 0 deletions
|
@ -636,6 +636,7 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file,
|
||||||
struct v4l2_ext_control *ctrl;
|
struct v4l2_ext_control *ctrl;
|
||||||
unsigned int idx;
|
unsigned int idx;
|
||||||
int val;
|
int val;
|
||||||
|
ret = 0;
|
||||||
for (idx = 0; idx < ctls->count; idx++) {
|
for (idx = 0; idx < ctls->count; idx++) {
|
||||||
ctrl = ctls->controls + idx;
|
ctrl = ctls->controls + idx;
|
||||||
ret = pvr2_ctrl_get_value(
|
ret = pvr2_ctrl_get_value(
|
||||||
|
@ -658,6 +659,7 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file,
|
||||||
(struct v4l2_ext_controls *)arg;
|
(struct v4l2_ext_controls *)arg;
|
||||||
struct v4l2_ext_control *ctrl;
|
struct v4l2_ext_control *ctrl;
|
||||||
unsigned int idx;
|
unsigned int idx;
|
||||||
|
ret = 0;
|
||||||
for (idx = 0; idx < ctls->count; idx++) {
|
for (idx = 0; idx < ctls->count; idx++) {
|
||||||
ctrl = ctls->controls + idx;
|
ctrl = ctls->controls + idx;
|
||||||
ret = pvr2_ctrl_set_value(
|
ret = pvr2_ctrl_set_value(
|
||||||
|
@ -680,6 +682,7 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file,
|
||||||
unsigned int idx;
|
unsigned int idx;
|
||||||
/* For the moment just validate that the requested control
|
/* For the moment just validate that the requested control
|
||||||
actually exists. */
|
actually exists. */
|
||||||
|
ret = 0;
|
||||||
for (idx = 0; idx < ctls->count; idx++) {
|
for (idx = 0; idx < ctls->count; idx++) {
|
||||||
ctrl = ctls->controls + idx;
|
ctrl = ctls->controls + idx;
|
||||||
pctl = pvr2_hdw_get_ctrl_v4l(hdw,ctrl->id);
|
pctl = pvr2_hdw_get_ctrl_v4l(hdw,ctrl->id);
|
||||||
|
|
Loading…
Reference in a new issue