From 3751e288bcf3d77652ef979edc0b3ea8b21d8b97 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 16 Nov 2010 11:39:25 -0300 Subject: [media] pwc: do not start isoc stream on /dev/video open pwc was starting streaming on /dev/video# open rather then on STREAM_ON. Now that the v4l1 compat code is removed from the pwc driver there is no reason left to do this. So this patch changes the pwc driver to delay starting the isoc stream (and thus using valuable usb bandwidth) until the application does a STREAM_ON Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/pwc/pwc-ctrl.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'drivers/media/video/pwc/pwc-ctrl.c') diff --git a/drivers/media/video/pwc/pwc-ctrl.c b/drivers/media/video/pwc/pwc-ctrl.c index 6b8fbddc074..1593f8deb81 100644 --- a/drivers/media/video/pwc/pwc-ctrl.c +++ b/drivers/media/video/pwc/pwc-ctrl.c @@ -1386,11 +1386,16 @@ long pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg) { ARG_DEF(int, qual) + if (pdev->iso_init) { + ret = -EBUSY; + break; + } + ARG_IN(qual) if (ARGR(qual) < 0 || ARGR(qual) > 3) ret = -EINVAL; else - ret = pwc_try_video_mode(pdev, pdev->view.x, pdev->view.y, pdev->vframes, ARGR(qual), pdev->vsnapshot); + ret = pwc_set_video_mode(pdev, pdev->view.x, pdev->view.y, pdev->vframes, ARGR(qual), pdev->vsnapshot); if (ret >= 0) pdev->vcompression = ARGR(qual); break; -- cgit v1.2.3-70-g09d2