diff options
author | Daniel Mack <daniel@caiaq.de> | 2010-04-12 07:17:25 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-20 16:21:38 -0400 |
commit | 997ea58eb92f9970b8af7aae48800d0ef43b9423 (patch) | |
tree | 65e021973e5a48ad7290d5be1f441940566468ad /sound/usb/usbmidi.c | |
parent | 48679c6d772b1459a2945729e3a1256ac78fcabf (diff) |
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 'sound/usb/usbmidi.c')
-rw-r--r-- | sound/usb/usbmidi.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c index 9e28b20cb2c..61b2d8fd033 100644 --- a/sound/usb/usbmidi.c +++ b/sound/usb/usbmidi.c | |||
@@ -1047,8 +1047,8 @@ static struct snd_rawmidi_ops snd_usbmidi_input_ops = { | |||
1047 | static void free_urb_and_buffer(struct snd_usb_midi *umidi, struct urb *urb, | 1047 | static void free_urb_and_buffer(struct snd_usb_midi *umidi, struct urb *urb, |
1048 | unsigned int buffer_length) | 1048 | unsigned int buffer_length) |
1049 | { | 1049 | { |
1050 | usb_buffer_free(umidi->dev, buffer_length, | 1050 | usb_free_coherent(umidi->dev, buffer_length, |
1051 | urb->transfer_buffer, urb->transfer_dma); | 1051 | urb->transfer_buffer, urb->transfer_dma); |
1052 | usb_free_urb(urb); | 1052 | usb_free_urb(urb); |
1053 | } | 1053 | } |
1054 | 1054 | ||
@@ -1099,8 +1099,8 @@ static int snd_usbmidi_in_endpoint_create(struct snd_usb_midi* umidi, | |||
1099 | pipe = usb_rcvbulkpipe(umidi->dev, ep_info->in_ep); | 1099 | pipe = usb_rcvbulkpipe(umidi->dev, ep_info->in_ep); |
1100 | length = usb_maxpacket(umidi->dev, pipe, 0); | 1100 | length = usb_maxpacket(umidi->dev, pipe, 0); |
1101 | for (i = 0; i < INPUT_URBS; ++i) { | 1101 | for (i = 0; i < INPUT_URBS; ++i) { |
1102 | buffer = usb_buffer_alloc(umidi->dev, length, GFP_KERNEL, | 1102 | buffer = usb_alloc_coherent(umidi->dev, length, GFP_KERNEL, |
1103 | &ep->urbs[i]->transfer_dma); | 1103 | &ep->urbs[i]->transfer_dma); |
1104 | if (!buffer) { | 1104 | if (!buffer) { |
1105 | snd_usbmidi_in_endpoint_delete(ep); | 1105 | snd_usbmidi_in_endpoint_delete(ep); |
1106 | return -ENOMEM; | 1106 | return -ENOMEM; |
@@ -1190,9 +1190,9 @@ static int snd_usbmidi_out_endpoint_create(struct snd_usb_midi* umidi, | |||
1190 | break; | 1190 | break; |
1191 | } | 1191 | } |
1192 | for (i = 0; i < OUTPUT_URBS; ++i) { | 1192 | for (i = 0; i < OUTPUT_URBS; ++i) { |
1193 | buffer = usb_buffer_alloc(umidi->dev, | 1193 | buffer = usb_alloc_coherent(umidi->dev, |
1194 | ep->max_transfer, GFP_KERNEL, | 1194 | ep->max_transfer, GFP_KERNEL, |
1195 | &ep->urbs[i].urb->transfer_dma); | 1195 | &ep->urbs[i].urb->transfer_dma); |
1196 | if (!buffer) { | 1196 | if (!buffer) { |
1197 | snd_usbmidi_out_endpoint_delete(ep); | 1197 | snd_usbmidi_out_endpoint_delete(ep); |
1198 | return -ENOMEM; | 1198 | return -ENOMEM; |