diff mbox series

[v6,05/17] media: pvrusb2: Do not check for V4L2_CTRL_WHICH_DEF_VAL

Message ID 20210317164511.39967-6-ribalda@chromium.org
State Superseded
Headers show
Series uvcvideo: Fix v4l2-compliance errors | expand

Commit Message

Ricardo Ribalda March 17, 2021, 4:44 p.m. UTC
The framework already checks for us if V4L2_CTRL_WHICH_DEF_VAL is
written.

Cc: Mike Isely <isely@pobox.com>
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
 drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Hans Verkuil March 18, 2021, 7:16 a.m. UTC | #1
On 17/03/2021 17:44, Ricardo Ribalda wrote:
> The framework already checks for us if V4L2_CTRL_WHICH_DEF_VAL is

> written.

> 

> Cc: Mike Isely <isely@pobox.com>

> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>


Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>


Thanks!

	Hans

> ---

>  drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 4 ----

>  1 file changed, 4 deletions(-)

> 

> diff --git a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c

> index 9657c1883311..c04ab7258d64 100644

> --- a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c

> +++ b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c

> @@ -640,10 +640,6 @@ static int pvr2_s_ext_ctrls(struct file *file, void *priv,

>  	unsigned int idx;

>  	int ret;

>  

> -	/* Default value cannot be changed */

> -	if (ctls->which == V4L2_CTRL_WHICH_DEF_VAL)

> -		return -EINVAL;

> -

>  	ret = 0;

>  	for (idx = 0; idx < ctls->count; idx++) {

>  		ctrl = ctls->controls + idx;

>
diff mbox series

Patch

diff --git a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
index 9657c1883311..c04ab7258d64 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
+++ b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
@@ -640,10 +640,6 @@  static int pvr2_s_ext_ctrls(struct file *file, void *priv,
 	unsigned int idx;
 	int ret;
 
-	/* Default value cannot be changed */
-	if (ctls->which == V4L2_CTRL_WHICH_DEF_VAL)
-		return -EINVAL;
-
 	ret = 0;
 	for (idx = 0; idx < ctls->count; idx++) {
 		ctrl = ctls->controls + idx;