aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-François Moine <moinejf@free.fr>2012-03-19 03:51:30 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-03-19 21:32:00 -0400
commitccbaba430241805076ebd16f90d8456c20bc796a (patch)
tree4aa2c9335c2bd86e2d85a9e2f9791ee022937c49
parent92dcffcf20feec54872e9e1c68e177b5549751ec (diff)
[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>
-rw-r--r--drivers/media/video/gspca/sn9c20x.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/video/gspca/sn9c20x.c b/drivers/media/video/gspca/sn9c20x.c
index 2a670eadca1c..896cff925fbb 100644
--- a/drivers/media/video/gspca/sn9c20x.c
+++ b/drivers/media/video/gspca/sn9c20x.c
@@ -2107,9 +2107,7 @@ static int sd_start(struct gspca_dev *gspca_dev)
2107 set_hvflip(gspca_dev); 2107 set_hvflip(gspca_dev);
2108 2108
2109 reg_w1(gspca_dev, 0x1007, 0x20); 2109 reg_w1(gspca_dev, 0x1007, 0x20);
2110 2110 reg_w1(gspca_dev, 0x1061, 0x03);
2111 reg_r(gspca_dev, 0x1061, 1);
2112 reg_w1(gspca_dev, 0x1061, gspca_dev->usb_buf[0] | 0x02);
2113 2111
2114 /* if JPEG, prepare the compression quality update */ 2112 /* if JPEG, prepare the compression quality update */
2115 if (mode & MODE_JPEG) { 2113 if (mode & MODE_JPEG) {
@@ -2125,9 +2123,7 @@ static int sd_start(struct gspca_dev *gspca_dev)
2125static void sd_stopN(struct gspca_dev *gspca_dev) 2123static void sd_stopN(struct gspca_dev *gspca_dev)
2126{ 2124{
2127 reg_w1(gspca_dev, 0x1007, 0x00); 2125 reg_w1(gspca_dev, 0x1007, 0x00);
2128 2126 reg_w1(gspca_dev, 0x1061, 0x01);
2129 reg_r(gspca_dev, 0x1061, 1);
2130 reg_w1(gspca_dev, 0x1061, gspca_dev->usb_buf[0] & ~0x02);
2131} 2127}
2132 2128
2133/* called on streamoff with alt==0 and on disconnect */ 2129/* called on streamoff with alt==0 and on disconnect */