Skip to contentSkip to conversation

spca561: i2c_read fix

PATCH New Shane 1 participant 1 message Sep 11, 2008 Media (V4L/DVB)

lore
Share & tools
lore

Shane

author
#0 lore raw

PATCH 1/1 spca561: i2c_read fix

This makes auto gain functional on my cam.

04fc:0561 Sunplus Technology Co., Ltd Flexcam 100

(patch is also attached in case it gets mangled)

drivers/media/video/gspca/spca561.c +0 -0
@@ -225,7 +225,7 @@ static int i2c_read(struct gspca_dev *gspca_dev,

__u16 reg, __u8 mode)

        reg_w_val(gspca_dev->dev, 0x8802, (mode | 0x01));
        do {
                reg_r(gspca_dev, 0x8803, 1);
-               if (!gspca_dev->usb_buf)
+               if (!gspca_dev->usb_buf[0])
                        break;
        } while (--retry);
        if (retry == 0)

Shane Shrybman

drivers/media/video/gspca/spca561.c +1 -1
index cfbc9eb..95fcfcb 100644
@@ -225,7 +225,7 @@ static int i2c_read(struct gspca_dev *gspca_dev, __u16 reg, __u8 mode)
 	reg_w_val(gspca_dev->dev, 0x8802, (mode | 0x01));
 	do {
 		reg_r(gspca_dev, 0x8803, 1);
-		if (!gspca_dev->usb_buf)
+		if (!gspca_dev->usb_buf[0])
 			break;
 	} while (--retry);
 	if (retry == 0)

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list