diff options
Diffstat (limited to 'sound/usb/midi.c')
-rw-r--r-- | sound/usb/midi.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/usb/midi.c b/sound/usb/midi.c index 2c1558c327bb..8b1e4b124a9f 100644 --- a/sound/usb/midi.c +++ b/sound/usb/midi.c | |||
@@ -1048,8 +1048,8 @@ static struct snd_rawmidi_ops snd_usbmidi_input_ops = { | |||
1048 | static void free_urb_and_buffer(struct snd_usb_midi *umidi, struct urb *urb, | 1048 | static void free_urb_and_buffer(struct snd_usb_midi *umidi, struct urb *urb, |
1049 | unsigned int buffer_length) | 1049 | unsigned int buffer_length) |
1050 | { | 1050 | { |
1051 | usb_buffer_free(umidi->dev, buffer_length, | 1051 | usb_free_coherent(umidi->dev, buffer_length, |
1052 | urb->transfer_buffer, urb->transfer_dma); | 1052 | urb->transfer_buffer, urb->transfer_dma); |
1053 | usb_free_urb(urb); | 1053 | usb_free_urb(urb); |
1054 | } | 1054 | } |
1055 | 1055 | ||
@@ -1100,8 +1100,8 @@ static int snd_usbmidi_in_endpoint_create(struct snd_usb_midi* umidi, | |||
1100 | pipe = usb_rcvbulkpipe(umidi->dev, ep_info->in_ep); | 1100 | pipe = usb_rcvbulkpipe(umidi->dev, ep_info->in_ep); |
1101 | length = usb_maxpacket(umidi->dev, pipe, 0); | 1101 | length = usb_maxpacket(umidi->dev, pipe, 0); |
1102 | for (i = 0; i < INPUT_URBS; ++i) { | 1102 | for (i = 0; i < INPUT_URBS; ++i) { |
1103 | buffer = usb_buffer_alloc(umidi->dev, length, GFP_KERNEL, | 1103 | buffer = usb_alloc_coherent(umidi->dev, length, GFP_KERNEL, |
1104 | &ep->urbs[i]->transfer_dma); | 1104 | &ep->urbs[i]->transfer_dma); |
1105 | if (!buffer) { | 1105 | if (!buffer) { |
1106 | snd_usbmidi_in_endpoint_delete(ep); | 1106 | snd_usbmidi_in_endpoint_delete(ep); |
1107 | return -ENOMEM; | 1107 | return -ENOMEM; |
@@ -1191,9 +1191,9 @@ static int snd_usbmidi_out_endpoint_create(struct snd_usb_midi* umidi, | |||
1191 | break; | 1191 | break; |
1192 | } | 1192 | } |
1193 | for (i = 0; i < OUTPUT_URBS; ++i) { | 1193 | for (i = 0; i < OUTPUT_URBS; ++i) { |
1194 | buffer = usb_buffer_alloc(umidi->dev, | 1194 | buffer = usb_alloc_coherent(umidi->dev, |
1195 | ep->max_transfer, GFP_KERNEL, | 1195 | ep->max_transfer, GFP_KERNEL, |
1196 | &ep->urbs[i].urb->transfer_dma); | 1196 | &ep->urbs[i].urb->transfer_dma); |
1197 | if (!buffer) { | 1197 | if (!buffer) { |
1198 | snd_usbmidi_out_endpoint_delete(ep); | 1198 | snd_usbmidi_out_endpoint_delete(ep); |
1199 | return -ENOMEM; | 1199 | return -ENOMEM; |