V4L/DVB: gspca - vc032x: Force main register write at probe time (poxxxx)
authorJean-François Moine <moinejf@free.fr>
Tue, 27 Jul 2010 08:34:49 +0000 (05:34 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 9 Aug 2010 02:42:53 +0000 (23:42 -0300)
On laptops, the webcam sometimes disconnects when writing the first main
register (b300). This patch prevents the creation of a new /dev/video<n>
on streaming start.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/gspca/vc032x.c

index 48a8af3078a3d7e24fc96101b1c18809c535e647..b16fd47e8ced11ef4e5f1644ef55d47a52f38fa6 100644 (file)
@@ -3520,8 +3520,8 @@ static int sd_init(struct gspca_dev *gspca_dev)
                        if (gspca_dev->usb_buf[0] != 0) {
                                reg_w(gspca_dev, 0xa0, 0x26, 0xb300);
                                reg_w(gspca_dev, 0xa0, 0x04, 0xb300);
-                               reg_w(gspca_dev, 0xa0, 0x00, 0xb300);
                        }
+                       reg_w(gspca_dev, 0xa0, 0x00, 0xb300);
                }
        }
        return gspca_dev->usb_err;