From: Jean-François Moine Date: Mon, 19 Mar 2012 07:51:30 +0000 (-0300) Subject: [media] gspca - sn9c20x: Simplify register write for capture start/stop X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ccbaba430241805076ebd16f90d8456c20bc796a;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git [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 Signed-off-by: Mauro Carvalho Chehab --- 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) set_hvflip(gspca_dev); reg_w1(gspca_dev, 0x1007, 0x20); - - reg_r(gspca_dev, 0x1061, 1); - reg_w1(gspca_dev, 0x1061, gspca_dev->usb_buf[0] | 0x02); + reg_w1(gspca_dev, 0x1061, 0x03); /* if JPEG, prepare the compression quality update */ if (mode & MODE_JPEG) { @@ -2125,9 +2123,7 @@ static int sd_start(struct gspca_dev *gspca_dev) static void sd_stopN(struct gspca_dev *gspca_dev) { reg_w1(gspca_dev, 0x1007, 0x00); - - reg_r(gspca_dev, 0x1061, 1); - reg_w1(gspca_dev, 0x1061, gspca_dev->usb_buf[0] & ~0x02); + reg_w1(gspca_dev, 0x1061, 0x01); } /* called on streamoff with alt==0 and on disconnect */