aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/usbmidi.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2010-04-12 13:17:25 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-20 13:21:38 -0700
commit997ea58eb92f9970b8af7aae48800d0ef43b9423 (patch)
tree65e021973e5a48ad7290d5be1f441940566468ad /sound/usb/usbmidi.c
parentUSB: Short new 'graph for usb-serial.txt (diff)
downloadlinux-dev-997ea58eb92f9970b8af7aae48800d0ef43b9423.tar.xz
linux-dev-997ea58eb92f9970b8af7aae48800d0ef43b9423.zip
USB: rename usb_buffer_alloc() and usb_buffer_free() users
For more clearance what the functions actually do, usb_buffer_alloc() is renamed to usb_alloc_coherent() usb_buffer_free() is renamed to usb_free_coherent() They should only be used in code which really needs DMA coherency. All call sites have been changed accordingly, except for staging drivers. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Pedro Ribeiro <pedrib@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to '')
-rw-r--r--sound/usb/usbmidi.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c
index 9e28b20cb2ce..61b2d8fd0331 100644
--- a/sound/usb/usbmidi.c
+++ b/sound/usb/usbmidi.c
@@ -1047,8 +1047,8 @@ static struct snd_rawmidi_ops snd_usbmidi_input_ops = {
static void free_urb_and_buffer(struct snd_usb_midi *umidi, struct urb *urb,
unsigned int buffer_length)
{
- usb_buffer_free(umidi->dev, buffer_length,
- urb->transfer_buffer, urb->transfer_dma);
+ usb_free_coherent(umidi->dev, buffer_length,
+ urb->transfer_buffer, urb->transfer_dma);
usb_free_urb(urb);
}
@@ -1099,8 +1099,8 @@ static int snd_usbmidi_in_endpoint_create(struct snd_usb_midi* umidi,
pipe = usb_rcvbulkpipe(umidi->dev, ep_info->in_ep);
length = usb_maxpacket(umidi->dev, pipe, 0);
for (i = 0; i < INPUT_URBS; ++i) {
- buffer = usb_buffer_alloc(umidi->dev, length, GFP_KERNEL,
- &ep->urbs[i]->transfer_dma);
+ buffer = usb_alloc_coherent(umidi->dev, length, GFP_KERNEL,
+ &ep->urbs[i]->transfer_dma);
if (!buffer) {
snd_usbmidi_in_endpoint_delete(ep);
return -ENOMEM;
@@ -1190,9 +1190,9 @@ static int snd_usbmidi_out_endpoint_create(struct snd_usb_midi* umidi,
break;
}
for (i = 0; i < OUTPUT_URBS; ++i) {
- buffer = usb_buffer_alloc(umidi->dev,
- ep->max_transfer, GFP_KERNEL,
- &ep->urbs[i].urb->transfer_dma);
+ buffer = usb_alloc_coherent(umidi->dev,
+ ep->max_transfer, GFP_KERNEL,
+ &ep->urbs[i].urb->transfer_dma);
if (!buffer) {
snd_usbmidi_out_endpoint_delete(ep);
return -ENOMEM;