[media] tm6000: bugfix at tm6000_set_reg_mask() register setting
authorStefan Ringel <linuxtv@stefanringel.de>
Mon, 28 Nov 2011 18:46:17 +0000 (15:46 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 28 Nov 2011 23:30:09 +0000 (21:30 -0200)
Signed-off-by: Stefan Ringel <linuxtv@stefanringel.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/tm6000/tm6000-core.c

index 55d097eaadd8e2ba05db4afa51db786a280b555a..5d7d045c652b13287e9f0fcdf8e7777044ccad83 100644 (file)
@@ -125,14 +125,14 @@ int tm6000_set_reg_mask(struct tm6000_core *dev, u8 req, u16 value,
        u8 new_index;
 
        rc = tm6000_read_write_usb(dev, USB_DIR_IN | USB_TYPE_VENDOR, req,
-                                       value, index, buf, 1);
+                                       value, 0, buf, 1);
 
        if (rc < 0)
                return rc;
 
        new_index = (buf[0] & ~mask) | (index & mask);
 
-       if (new_index == index)
+       if (new_index == buf[0])
                return 0;
 
        return tm6000_read_write_usb(dev, USB_DIR_OUT | USB_TYPE_VENDOR,