[media] uvc: fix sparse warning
authorHans Verkuil <hans.verkuil@cisco.com>
Wed, 20 Aug 2014 20:58:38 +0000 (17:58 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Wed, 3 Sep 2014 12:36:44 +0000 (09:36 -0300)
drivers/media/usb/uvc/uvc_video.c:1466:38: warning: incorrect type in return expression (different base types)

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/uvc/uvc_video.c

index 9144a2f..7e350d7 100644 (file)
@@ -1463,7 +1463,7 @@ static unsigned int uvc_endpoint_max_bpi(struct usb_device *dev,
 
        switch (dev->speed) {
        case USB_SPEED_SUPER:
-               return ep->ss_ep_comp.wBytesPerInterval;
+               return le16_to_cpu(ep->ss_ep_comp.wBytesPerInterval);
        case USB_SPEED_HIGH:
                psize = usb_endpoint_maxp(&ep->desc);
                return (psize & 0x07ff) * (1 + ((psize >> 11) & 3));