linux/sound
Julia Lawall 42a6e66f1e ALSA: sound/usb: 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: Takashi Iwai <tiwai@suse.de>
2009-01-01 10:27:33 +01:00
..
aoa Merge branch 'topic/aoa' into to-push 2008-12-25 11:40:24 +01:00
arm [ARM] pxa: move AC97 register definitions into dedicated regs-ac97.h 2008-12-02 14:42:39 +08:00
core Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-12-30 16:16:21 -08:00
drivers Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-12-30 16:16:21 -08:00
i2c V4L/DVB (9533): cx88: Add support for TurboSight TBS8910 DVB-S PCI card 2008-12-29 17:53:28 -02:00
isa Merge branch 'topic/pcsp-fix' into topic/misc 2008-12-20 23:39:47 +01:00
mips ALSA: Kill snd_assert() in other places 2008-08-13 11:46:40 +02:00
oss [ARM] netwinder: clean up GPIO naming 2008-12-13 09:12:07 +00:00
parisc ALSA: harmony - fix a typo 2008-09-04 10:33:55 +02:00
pci Merge branch 'topic/udev-id-rename' into to-push 2008-12-25 11:40:34 +01:00
pcmcia ALSA: hda - Convert from takslet_hi_schedule() to tasklet_schedule() 2008-12-18 12:17:55 +01:00
ppc Merge branch 'topic/misc' into topic/pcsp-fix 2008-11-26 14:12:42 +01:00
sh ALSA: Fix section for snd-aica platform driver 2008-09-23 08:17:58 +02:00
soc Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2008-12-30 17:36:49 -08:00
sparc Revert "of_platform_driver noise on sparce" 2008-12-01 07:55:14 -08:00
spi sound: Convert to menuconfig 2008-05-27 15:56:20 +02:00
synth ALSA: Kill snd_assert() in other places 2008-08-13 11:46:40 +02:00
usb ALSA: sound/usb: use USB API functions rather than constants 2009-01-01 10:27:33 +01:00
Kconfig Fix CONFIG_AC97_BUS dependency 2008-09-06 11:43:41 +02:00
Makefile [ALSA] Add SPI devices to ALSA Kconfig and Makefile 2007-10-16 15:57:47 +02:00
ac97_bus.c ALSA: ac97 - Include ac97_codec.h for ac97_bus_type declaration 2008-12-02 16:25:37 +01:00
last.c [ALSA] Remove sound/driver.h 2008-01-31 17:29:48 +01:00
sound_core.c ALSA: Fix declaration of sound_class 2008-12-15 16:55:27 +01:00
sound_firmware.c Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00