kernel-ark/drivers/usb/storage
Julia Lawall 2e0fe70968 USB: drivers: 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:28 -07:00
..
alauda.c
alauda.h
cypress_atacb.c
cypress_atacb.h
datafab.c
datafab.h
debug.c
debug.h
freecom.c
freecom.h
initializers.c USB: support Huawei data card product IDs 2008-10-22 10:05:28 -07:00
initializers.h
isd200.c
isd200.h
jumpshot.c
jumpshot.h
karma.c
karma.h
Kconfig USB: usb-storage: merge DPCM support into SDDR09 2009-01-07 10:00:06 -08:00
libusual.c USB: storage: add last-sector hacks 2009-01-07 10:00:11 -08:00
Makefile USB: unusual dev for Option N.V. ZeroCD modems 2009-01-07 10:00:09 -08:00
onetouch.c USB: remove err() macro from more usb drivers 2008-10-17 14:41:14 -07:00
onetouch.h
option_ms.c USB: unusual dev for Option N.V. ZeroCD modems 2009-01-07 10:00:09 -08:00
option_ms.h USB: unusual dev for Option N.V. ZeroCD modems 2009-01-07 10:00:09 -08:00
protocol.c USB: usb-storage: merge ATAPI and QIC-157 protocol routines 2009-01-07 09:59:57 -08:00
protocol.h USB: usb-storage: merge ATAPI and QIC-157 protocol routines 2009-01-07 09:59:57 -08:00
scsiglue.c USB: usb-storage: increase max_sectors for tape drives 2009-03-24 16:20:26 -07:00
scsiglue.h
sddr09.c USB: usb-storage: merge DPCM support into SDDR09 2009-01-07 10:00:06 -08:00
sddr09.h USB: usb-storage: merge DPCM support into SDDR09 2009-01-07 10:00:06 -08:00
sddr55.c
sddr55.h
shuttle_usbat.c
shuttle_usbat.h
sierra_ms.c USB Storage Sierra: TRU-Install feature update 2008-08-13 17:32:51 -07:00
sierra_ms.h USB Storage Sierra: TRU-Install feature update 2008-08-13 17:32:51 -07:00
transport.c USB: usb-storage: remove WARN from last-sector hacks 2009-02-09 11:19:47 -08:00
transport.h USB: usb-storage: merge CB and CBI transport routines 2009-01-07 09:59:57 -08:00
unusual_devs.h USB: storage: Unusual USB device Prolific 2507 variation added 2009-03-17 14:01:29 -07:00
usb.c USB: drivers: use USB API functions rather than constants 2009-03-24 16:20:28 -07:00
usb.h USB: storage: add last-sector hacks 2009-01-07 10:00:11 -08:00