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 48a8af3..b16fd47 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;