diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-01-03 19:53:10 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-01-03 19:53:10 +0000 |
commit | 48a5b962830004fe6d60560781a6a21e1919c68f (patch) | |
tree | c34005e34e20a8cbc28ede39c7fd0162d59a49b3 /linux | |
parent | 9fbbdfb475da6e55d01ca056dad74e8dc51e1160 (diff) | |
download | mediapointer-dvb-s2-48a5b962830004fe6d60560781a6a21e1919c68f.tar.gz mediapointer-dvb-s2-48a5b962830004fe6d60560781a6a21e1919c68f.tar.bz2 |
Use negated usb_endpoint_xfer_control, etc
From: Julia Lawall <julia@diku.dk>
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>
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-cards.c | 3 | ||||
-rw-r--r-- | linux/drivers/media/video/usbvideo/ibmcam.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/usbvideo/konicawc.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/usbvideo/ultracam.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/usbvision/usbvision-video.c | 3 |
5 files changed, 5 insertions, 7 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-cards.c b/linux/drivers/media/video/em28xx/em28xx-cards.c index 34934348f..73a41bcd5 100644 --- a/linux/drivers/media/video/em28xx/em28xx-cards.c +++ b/linux/drivers/media/video/em28xx/em28xx-cards.c @@ -2073,8 +2073,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)) diff --git a/linux/drivers/media/video/usbvideo/ibmcam.c b/linux/drivers/media/video/usbvideo/ibmcam.c index 8b1a10fe1..ceadf5925 100644 --- a/linux/drivers/media/video/usbvideo/ibmcam.c +++ b/linux/drivers/media/video/usbvideo/ibmcam.c @@ -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; } diff --git a/linux/drivers/media/video/usbvideo/konicawc.c b/linux/drivers/media/video/usbvideo/konicawc.c index cf20643a0..75485168e 100644 --- a/linux/drivers/media/video/usbvideo/konicawc.c +++ b/linux/drivers/media/video/usbvideo/konicawc.c @@ -836,7 +836,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; diff --git a/linux/drivers/media/video/usbvideo/ultracam.c b/linux/drivers/media/video/usbvideo/ultracam.c index b0c9495e8..46d085c2b 100644 --- a/linux/drivers/media/video/usbvideo/ultracam.c +++ b/linux/drivers/media/video/usbvideo/ultracam.c @@ -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; diff --git a/linux/drivers/media/video/usbvision/usbvision-video.c b/linux/drivers/media/video/usbvision/usbvision-video.c index 2be5e47ed..2622de003 100644 --- a/linux/drivers/media/video/usbvision/usbvision-video.c +++ b/linux/drivers/media/video/usbvision/usbvision-video.c @@ -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", |