]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (10185): Use negated usb_endpoint_xfer_control, etc
authorJulia Lawall <julia@diku.dk>
Sat, 3 Jan 2009 19:53:10 +0000 (16:53 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 8 Jan 2009 00:18:56 +0000 (22:18 -0200)
This patch extends 134179823b3ca9c8b98e0631906459dbb022ff9b by using
usb_endpoint_xfer_control, usb_endpoint_xfer_isoc, usb_endpoint_xfer_bulk,
and usb_endpoint_xfer_int in the negated case as well.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@ struct usb_endpoint_descriptor *epd; @@

- (usb_endpoint_type(epd) != \(USB_ENDPOINT_XFER_CONTROL\|0\))
+ !usb_endpoint_xfer_control(epd)

@@ struct usb_endpoint_descriptor *epd; @@

- (usb_endpoint_type(epd) != \(USB_ENDPOINT_XFER_ISOC\|1\))
+ !usb_endpoint_xfer_isoc(epd)

@@ struct usb_endpoint_descriptor *epd; @@

- (usb_endpoint_type(epd) != \(USB_ENDPOINT_XFER_BULK\|2\))
+ !usb_endpoint_xfer_bulk(epd)

@@ struct usb_endpoint_descriptor *epd; @@

- (usb_endpoint_type(epd) != \(USB_ENDPOINT_XFER_INT\|3\))
+ !usb_endpoint_xfer_int(epd)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/em28xx/em28xx-cards.c
drivers/media/video/usbvideo/ibmcam.c
drivers/media/video/usbvideo/konicawc.c
drivers/media/video/usbvideo/ultracam.c
drivers/media/video/usbvision/usbvision-video.c

index 6d2e4a6f8b2b607b23285e66047ddae884a6e5c7..ef9bf008a924731f9f7e4728087d0a5050606e26 100644 (file)
@@ -1990,8 +1990,7 @@ static int em28xx_usb_probe(struct usb_interface *interface,
                int check_interface = 1;
                isoc_pipe = 1;
                endpoint = &interface->cur_altsetting->endpoint[1].desc;
-               if (usb_endpoint_type(endpoint) !=
-                   USB_ENDPOINT_XFER_ISOC)
+               if (!usb_endpoint_xfer_isoc(endpoint))
                        check_interface = 0;
 
                if (usb_endpoint_dir_out(endpoint))
index f8d85ddb48048b6eb320d2cabdcdd5f929a5ea2c..b08549661781948fa441055d128b027a6e865fe5 100644 (file)
@@ -3779,7 +3779,7 @@ static int ibmcam_probe(struct usb_interface *intf, const struct usb_device_id *
                        err("Alternate settings have different endpoint addresses!");
                        return -ENODEV;
                }
-               if (usb_endpoint_type(endpoint) != USB_ENDPOINT_XFER_ISOC) {
+               if (!usb_endpoint_xfer_isoc(endpoint)) {
                        err("Interface %d. has non-ISO endpoint!", ifnum);
                        return -ENODEV;
                }
index 90f0ce6a26bc017de47bc3f8bb8c762121abf001..900ec2129ca16a283ec351ec3efd4f1ee9827144 100644 (file)
@@ -823,7 +823,7 @@ static int konicawc_probe(struct usb_interface *intf, const struct usb_device_id
                        err("Alternate settings have different endpoint addresses!");
                        return -ENODEV;
                }
-               if (usb_endpoint_type(endpoint) != USB_ENDPOINT_XFER_ISOC) {
+               if (!usb_endpoint_xfer_isoc(endpoint)) {
                        err("Interface %d. has non-ISO endpoint!",
                            interface->desc.bInterfaceNumber);
                        return -ENODEV;
index 839a08240c2579f96768e0d544b13e873f857b51..fbd1b6392290b8c4d57b6cb52bf3feefe6b50cf4 100644 (file)
@@ -556,7 +556,7 @@ static int ultracam_probe(struct usb_interface *intf, const struct usb_device_id
                        err("Alternate settings have different endpoint addresses!");
                        return -ENODEV;
                }
-               if (usb_endpoint_type(endpoint) != USB_ENDPOINT_XFER_ISOC) {
+               if (!usb_endpoint_xfer_isoc(endpoint)) {
                        err("Interface %d. has non-ISO endpoint!",
                            interface->desc.bInterfaceNumber);
                        return -ENODEV;
index 2be5e47ed081949b8f50b2f6528d9929d47c45d8..2622de003a452a49936f628fa6a0c063857be7c6 100644 (file)
@@ -1674,8 +1674,7 @@ static int __devinit usbvision_probe(struct usb_interface *intf,
                interface = &dev->actconfig->interface[ifnum]->altsetting[0];
        }
        endpoint = &interface->endpoint[1].desc;
-       if (usb_endpoint_type(endpoint) !=
-           USB_ENDPOINT_XFER_ISOC) {
+       if (!usb_endpoint_xfer_isoc(endpoint)) {
                err("%s: interface %d. has non-ISO endpoint!",
                    __func__, ifnum);
                err("%s: Endpoint attributes %d",