]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/em28xx/em28xx-cards.c
V4L/DVB (10130): use USB API functions rather than constants
[linux-2.6-omap-h63xx.git] / drivers / media / video / em28xx / em28xx-cards.c
index 84191c9dc54d9febd94adfdb6e53392e091ca0b2..e776699b62f958ebcc54989751f32908f22d991c 100644 (file)
@@ -1981,8 +1981,8 @@ static int em28xx_usb_probe(struct usb_interface *interface,
        endpoint = &interface->cur_altsetting->endpoint[0].desc;
 
        /* check if the device has the iso in endpoint at the correct place */
-       if ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) ==
-           USB_ENDPOINT_XFER_ISOC &&
+       if (usb_endpoint_xfer_isoc(endpoint)
+           &&
            (interface->altsetting[1].endpoint[0].desc.wMaxPacketSize == 940)) {
                /* It's a newer em2874/em2875 device */
                isoc_pipe = 0;
@@ -1990,11 +1990,11 @@ static int em28xx_usb_probe(struct usb_interface *interface,
                int check_interface = 1;
                isoc_pipe = 1;
                endpoint = &interface->cur_altsetting->endpoint[1].desc;
-               if ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) !=
+               if (usb_endpoint_type(endpoint) !=
                    USB_ENDPOINT_XFER_ISOC)
                        check_interface = 0;
 
-               if ((endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT)
+               if (usb_endpoint_dir_out(endpoint))
                        check_interface = 0;
 
                if (!check_interface) {