diff mbox

[RFC] v4l2-ctl: don't exit on VIDIOC_QUERYCAP error for subdevices

Message ID 1427361704-32456-1-git-send-email-p.zabel@pengutronix.de (mailing list archive)
State New, archived
Headers show

Commit Message

Philipp Zabel March 26, 2015, 9:21 a.m. UTC
Subdevice nodes don't implement VIDIOC_QUERYCAP. This check doesn't
allow any operations on v42-subdev nodes, such as setting EDID.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
 utils/v4l2-ctl/v4l2-ctl.cpp | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Hans Verkuil March 26, 2015, 4:48 p.m. UTC | #1
On 03/26/2015 02:21 AM, Philipp Zabel wrote:
> Subdevice nodes don't implement VIDIOC_QUERYCAP. This check doesn't
> allow any operations on v42-subdev nodes, such as setting EDID.

Nack because I'm going to create a proper VIDIOC_SUBDEV_QUERYCAP for
subdevs. I'm planning to work on this next week.

Regards,

	Hans

> 
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> ---
>  utils/v4l2-ctl/v4l2-ctl.cpp | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/utils/v4l2-ctl/v4l2-ctl.cpp b/utils/v4l2-ctl/v4l2-ctl.cpp
> index b340af7..211372b 100644
> --- a/utils/v4l2-ctl/v4l2-ctl.cpp
> +++ b/utils/v4l2-ctl/v4l2-ctl.cpp
> @@ -1149,10 +1149,7 @@ int main(int argc, char **argv)
>  	}
>  
>  	verbose = options[OptVerbose];
> -	if (doioctl(fd, VIDIOC_QUERYCAP, &vcap)) {
> -		fprintf(stderr, "%s: not a v4l2 node\n", device);
> -		exit(1);
> -	}
> +	doioctl(fd, VIDIOC_QUERYCAP, &vcap);
>  	capabilities = vcap.capabilities;
>  	if (capabilities & V4L2_CAP_DEVICE_CAPS)
>  		capabilities = vcap.device_caps;
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Philipp Zabel March 26, 2015, 5:09 p.m. UTC | #2
Am Donnerstag, den 26.03.2015, 09:48 -0700 schrieb Hans Verkuil:
> On 03/26/2015 02:21 AM, Philipp Zabel wrote:
> > Subdevice nodes don't implement VIDIOC_QUERYCAP. This check doesn't
> > allow any operations on v42-subdev nodes, such as setting EDID.
> 
> Nack because I'm going to create a proper VIDIOC_SUBDEV_QUERYCAP for
> subdevs. I'm planning to work on this next week.

Oh great, thanks for the heads-up.

regards
Philipp

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/utils/v4l2-ctl/v4l2-ctl.cpp b/utils/v4l2-ctl/v4l2-ctl.cpp
index b340af7..211372b 100644
--- a/utils/v4l2-ctl/v4l2-ctl.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl.cpp
@@ -1149,10 +1149,7 @@  int main(int argc, char **argv)
 	}
 
 	verbose = options[OptVerbose];
-	if (doioctl(fd, VIDIOC_QUERYCAP, &vcap)) {
-		fprintf(stderr, "%s: not a v4l2 node\n", device);
-		exit(1);
-	}
+	doioctl(fd, VIDIOC_QUERYCAP, &vcap);
 	capabilities = vcap.capabilities;
 	if (capabilities & V4L2_CAP_DEVICE_CAPS)
 		capabilities = vcap.device_caps;