From 04881127340c43fc5b8dbc2c381c1928ee22559e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Moine?= Date: Thu, 22 Nov 2012 08:59:06 -0300 Subject: [media] gspca - stv06xx: Fix a regression with the bridge/sensor vv6410 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Setting the H and V flip controls at webcam connection time prevents the webcam to work correctly. This patch checks if the webcam is streaming before setting the flips. It does not set the flips (nor other controls) at webcam start time. Tested-by: Philippe ROUBACH Signed-off-by: Jean-François Moine Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/media/usb/gspca') diff --git a/drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c b/drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c index 748e1421d6d8..cbb153180d59 100644 --- a/drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c +++ b/drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c @@ -52,9 +52,13 @@ static int vv6410_s_ctrl(struct v4l2_ctrl *ctrl) switch (ctrl->id) { case V4L2_CID_HFLIP: + if (!gspca_dev->streaming) + return 0; err = vv6410_set_hflip(gspca_dev, ctrl->val); break; case V4L2_CID_VFLIP: + if (!gspca_dev->streaming) + return 0; err = vv6410_set_vflip(gspca_dev, ctrl->val); break; case V4L2_CID_GAIN: -- cgit v1.2.2