From 48a5b962830004fe6d60560781a6a21e1919c68f Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 3 Jan 2009 19:53:10 +0000 Subject: Use negated usb_endpoint_xfer_control, etc From: Julia Lawall 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/) // @@ 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) // Signed-off-by: Julia Lawall Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/usbvideo/ibmcam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers/media/video/usbvideo/ibmcam.c') 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; } -- cgit v1.2.3