diff options
author | Sean Young <sean@mess.org> | 2013-01-29 06:19:28 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-02-08 11:12:12 -0500 |
commit | 1e801adc7a70c2f67214b2617088a41f4bebe55e (patch) | |
tree | de7fa4b2d95c85862a278030b159916c97dfad9a | |
parent | d2008b56cfd6fa76ac6990d9c12a045ce5026c85 (diff) |
[media] ttusbir: add missing endian conversion
spotted by sparse.
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/rc/ttusbir.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/media/rc/ttusbir.c b/drivers/media/rc/ttusbir.c index f9226b83de41..cf0d47f57fb2 100644 --- a/drivers/media/rc/ttusbir.c +++ b/drivers/media/rc/ttusbir.c | |||
@@ -213,19 +213,20 @@ static int ttusbir_probe(struct usb_interface *intf, | |||
213 | 213 | ||
214 | /* find the correct alt setting */ | 214 | /* find the correct alt setting */ |
215 | for (i = 0; i < intf->num_altsetting && altsetting == -1; i++) { | 215 | for (i = 0; i < intf->num_altsetting && altsetting == -1; i++) { |
216 | int bulk_out_endp = -1, iso_in_endp = -1; | 216 | int max_packet, bulk_out_endp = -1, iso_in_endp = -1; |
217 | 217 | ||
218 | idesc = &intf->altsetting[i].desc; | 218 | idesc = &intf->altsetting[i].desc; |
219 | 219 | ||
220 | for (j = 0; j < idesc->bNumEndpoints; j++) { | 220 | for (j = 0; j < idesc->bNumEndpoints; j++) { |
221 | desc = &intf->altsetting[i].endpoint[j].desc; | 221 | desc = &intf->altsetting[i].endpoint[j].desc; |
222 | max_packet = le16_to_cpu(desc->wMaxPacketSize); | ||
222 | if (usb_endpoint_dir_in(desc) && | 223 | if (usb_endpoint_dir_in(desc) && |
223 | usb_endpoint_xfer_isoc(desc) && | 224 | usb_endpoint_xfer_isoc(desc) && |
224 | desc->wMaxPacketSize == 0x10) | 225 | max_packet == 0x10) |
225 | iso_in_endp = j; | 226 | iso_in_endp = j; |
226 | else if (usb_endpoint_dir_out(desc) && | 227 | else if (usb_endpoint_dir_out(desc) && |
227 | usb_endpoint_xfer_bulk(desc) && | 228 | usb_endpoint_xfer_bulk(desc) && |
228 | desc->wMaxPacketSize == 0x20) | 229 | max_packet == 0x20) |
229 | bulk_out_endp = j; | 230 | bulk_out_endp = j; |
230 | 231 | ||
231 | if (bulk_out_endp != -1 && iso_in_endp != -1) { | 232 | if (bulk_out_endp != -1 && iso_in_endp != -1) { |