Skip to content

Commit

Permalink
[media] tm6000: bugfix at tm6000_set_reg_mask() register setting
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Ringel <linuxtv@stefanringel.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Stefan Ringel authored and Mauro Carvalho Chehab committed Nov 28, 2011
1 parent 078a68c commit c00ecc9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/video/tm6000/tm6000-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c00ecc9

Please sign in to comment.