linux/drivers/block
Julia Lawall db5e6df172 USB: ub: use USB API functions rather than constants
This set of patches introduces calls to the following set of functions:

usb_endpoint_dir_in(epd)
usb_endpoint_dir_out(epd)
usb_endpoint_is_bulk_in(epd)
usb_endpoint_is_bulk_out(epd)
usb_endpoint_is_int_in(epd)
usb_endpoint_is_int_out(epd)
usb_endpoint_num(epd)
usb_endpoint_type(epd)
usb_endpoint_xfer_bulk(epd)
usb_endpoint_xfer_control(epd)
usb_endpoint_xfer_int(epd)
usb_endpoint_xfer_isoc(epd)

In some cases, introducing one of these functions is not possible, and it
just replaces an explicit integer value by one of the following constants:

USB_ENDPOINT_XFER_BULK
USB_ENDPOINT_XFER_CONTROL
USB_ENDPOINT_XFER_INT
USB_ENDPOINT_XFER_ISOC

An extract of the semantic patch that makes these changes is as follows:
(http://www.emn.fr/x-info/coccinelle/)

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

- ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) ==
- \(USB_ENDPOINT_XFER_CONTROL\|0\))
+ usb_endpoint_xfer_control(epd)

@r5@ struct usb_endpoint_descriptor *epd; @@

- ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) ==
-  \(USB_DIR_IN\|0x80\))
+ usb_endpoint_dir_in(epd)

@inc@
@@

#include <linux/usb.h>

@depends on !inc && (r1||r5)@
@@

+ #include <linux/usb.h>
  #include <linux/usb/...>
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:27 -07:00
..
aoe aoe: error printed 1 too early 2009-03-04 00:11:52 -08:00
paride paride/pg.c: xs(): &&/|| confusion 2009-02-18 10:32:01 +01:00
amiflop.c m68k: amiflop - Get rid of sleep_on calls 2009-01-12 20:56:33 +01:00
ataflop.c m68k: atari - Rename "mfp" to "st_mfp" 2009-02-22 09:23:02 -08:00
brd.c [PATCH] switch brd 2008-10-21 07:47:44 -04:00
cciss_cmd.h cciss: switch to using hlist for command list management 2008-12-29 08:28:43 +01:00
cciss_scsi.c cciss: Fix cciss SCSI rescan code to better notice device changes 2008-10-09 08:56:18 +02:00
cciss_scsi.h cciss: Fix cciss SCSI rescan code to better notice device changes 2008-10-09 08:56:18 +02:00
cciss.c cciss: remove 30 second initial timeout on controller reset 2009-03-05 12:04:57 +01:00
cciss.h cciss: switch to using hlist for command list management 2008-12-29 08:28:43 +01:00
cpqarray.c cpqarry: fix return value of cpqarray_init() 2008-11-06 15:41:17 -08:00
cpqarray.h
cryptoloop.c drivers: Remove unnecessary inclusions of asm/semaphore.h 2008-04-18 22:16:32 -04:00
DAC960.c [PATCH] switch DAC960 2008-10-21 07:47:36 -04:00
DAC960.h Fix DAC960 driver on machines which don't support 64-bit DMA 2007-09-11 17:21:19 -07:00
floppy.c floppy: request and release only the ports we actually use 2009-02-18 15:37:55 -08:00
hd.c hd: WIN_* -> ATA_CMD_* 2008-10-10 22:39:21 +02:00
ida_cmd.h
ida_ioctl.h
Kconfig Create/use more directory structure in the Documentation/ tree. 2008-11-14 17:28:53 +00:00
loop.c loop: don't increment p->offset with (size_t) -EINVAL 2009-03-05 12:04:57 +01:00
Makefile ps3/block: Replace mtd/ps3vram by block/ps3vram 2009-03-13 16:07:19 +11:00
nbd.c nbd: fix I/O hang on disconnected nbds 2009-02-11 14:25:37 -08:00
pktcdvd.c pktcdvd: remove broken dev_t export of class devices 2008-12-10 10:03:32 -08:00
ps3disk.c powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/block 2009-01-16 16:15:13 +11:00
ps3vram.c ps3/block: Replace mtd/ps3vram by block/ps3vram 2009-03-13 16:07:19 +11:00
smart1,2.h
sunvdc.c sparc64: Fix unsigned long long warnings in drivers. 2009-01-06 13:20:38 -08:00
swim3.c [PATCH] switch swim3 2008-10-21 07:48:03 -04:00
sx8.c block: replace remaining __FUNCTION__ occurrences 2008-04-21 09:51:04 +02:00
ub.c USB: ub: use USB API functions rather than constants 2009-03-24 16:20:27 -07:00
umem.c Cleanup umem driver: fix most checkpatch warnings, conform to kernel 2007-12-18 08:29:28 +01:00
umem.h drivers/block/umem: trim trailing whitespace 2007-10-10 09:25:59 +02:00
viodasd.c [PATCH] switch viodasd 2008-10-21 07:48:07 -04:00
virtio_blk.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus 2008-12-30 17:37:25 -08:00
xd.c [PATCH] switch xd 2008-10-21 07:48:11 -04:00
xd.h [PATCH] switch xd 2008-10-21 07:48:11 -04:00
xen-blkfront.c Fix kernel NULL pointer dereference in xen-blkfront 2009-03-05 12:04:57 +01:00
xsysace.c Fix Xilinx SystemACE driver to handle empty CF slot 2009-03-14 21:06:52 +01:00
z2ram.c [PATCH] switch z2ram 2008-10-21 07:48:17 -04:00