Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] gspca - sn9c20x: Simplify register write for capture start/stop

The bridge register 1061 may take only the values 01 (stop) or 03 (start).

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Jean-François Moine and committed by
Mauro Carvalho Chehab
ccbaba43 92dcffcf

+2 -6
+2 -6
drivers/media/video/gspca/sn9c20x.c
··· 2107 2107 set_hvflip(gspca_dev); 2108 2108 2109 2109 reg_w1(gspca_dev, 0x1007, 0x20); 2110 - 2111 - reg_r(gspca_dev, 0x1061, 1); 2112 - reg_w1(gspca_dev, 0x1061, gspca_dev->usb_buf[0] | 0x02); 2110 + reg_w1(gspca_dev, 0x1061, 0x03); 2113 2111 2114 2112 /* if JPEG, prepare the compression quality update */ 2115 2113 if (mode & MODE_JPEG) { ··· 2123 2125 static void sd_stopN(struct gspca_dev *gspca_dev) 2124 2126 { 2125 2127 reg_w1(gspca_dev, 0x1007, 0x00); 2126 - 2127 - reg_r(gspca_dev, 0x1061, 1); 2128 - reg_w1(gspca_dev, 0x1061, gspca_dev->usb_buf[0] & ~0x02); 2128 + reg_w1(gspca_dev, 0x1061, 0x01); 2129 2129 } 2130 2130 2131 2131 /* called on streamoff with alt==0 and on disconnect */