Commit 1e801adc authored by Sean Young's avatar Sean Young Committed by Mauro Carvalho Chehab

[media] ttusbir: add missing endian conversion

spotted by sparse.
Signed-off-by: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent d2008b56
...@@ -213,19 +213,20 @@ static int ttusbir_probe(struct usb_interface *intf, ...@@ -213,19 +213,20 @@ static int ttusbir_probe(struct usb_interface *intf,
/* find the correct alt setting */ /* find the correct alt setting */
for (i = 0; i < intf->num_altsetting && altsetting == -1; i++) { for (i = 0; i < intf->num_altsetting && altsetting == -1; i++) {
int bulk_out_endp = -1, iso_in_endp = -1; int max_packet, bulk_out_endp = -1, iso_in_endp = -1;
idesc = &intf->altsetting[i].desc; idesc = &intf->altsetting[i].desc;
for (j = 0; j < idesc->bNumEndpoints; j++) { for (j = 0; j < idesc->bNumEndpoints; j++) {
desc = &intf->altsetting[i].endpoint[j].desc; desc = &intf->altsetting[i].endpoint[j].desc;
max_packet = le16_to_cpu(desc->wMaxPacketSize);
if (usb_endpoint_dir_in(desc) && if (usb_endpoint_dir_in(desc) &&
usb_endpoint_xfer_isoc(desc) && usb_endpoint_xfer_isoc(desc) &&
desc->wMaxPacketSize == 0x10) max_packet == 0x10)
iso_in_endp = j; iso_in_endp = j;
else if (usb_endpoint_dir_out(desc) && else if (usb_endpoint_dir_out(desc) &&
usb_endpoint_xfer_bulk(desc) && usb_endpoint_xfer_bulk(desc) &&
desc->wMaxPacketSize == 0x20) max_packet == 0x20)
bulk_out_endp = j; bulk_out_endp = j;
if (bulk_out_endp != -1 && iso_in_endp != -1) { if (bulk_out_endp != -1 && iso_in_endp != -1) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment