aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-05-21 00:26:12 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-21 00:26:12 -0400
commit7a9b149212f3716c598afe973b6261fd58453b7a (patch)
tree477716d84c71da124448b72278e98da28aadbd3d /sound
parent3d62e3fdce8ef265a3706c52ae1ca6ab84e30f0e (diff)
parente26bcf37234c67624f62d9fc95f922b8dbda1363 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (229 commits) USB: remove unused usb_buffer_alloc and usb_buffer_free macros usb: musb: update gfp/slab.h includes USB: ftdi_sio: fix legacy SIO-device header USB: kl5usb105: reimplement using generic framework USB: kl5usb105: minor clean ups USB: kl5usb105: fix memory leak USB: io_ti: use kfifo to implement write buffering USB: io_ti: remove unsused private counter USB: ti_usb: use kfifo to implement write buffering USB: ir-usb: fix incorrect write-buffer length USB: aircable: fix incorrect write-buffer length USB: safe_serial: straighten out read processing USB: safe_serial: reimplement read using generic framework USB: safe_serial: reimplement write using generic framework usb-storage: always print quirks USB: usb-storage: trivial debug improvements USB: oti6858: use port write fifo USB: oti6858: use kfifo to implement write buffering USB: cypress_m8: use kfifo to implement write buffering USB: cypress_m8: remove unused drain define ... Fix up conflicts (due to usb_buffer_alloc/free renaming) in drivers/input/tablet/acecad.c drivers/input/tablet/kbtab.c drivers/input/tablet/wacom_sys.c drivers/media/video/gspca/gspca.c sound/usb/usbaudio.c
Diffstat (limited to 'sound')
-rw-r--r--sound/usb/midi.c14
-rw-r--r--sound/usb/misc/ua101.c16
2 files changed, 15 insertions, 15 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 = {
1048static void free_urb_and_buffer(struct snd_usb_midi *umidi, struct urb *urb, 1048static 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;
diff --git a/sound/usb/misc/ua101.c b/sound/usb/misc/ua101.c
index 796d8b25ee89..fb5d68fa7ff4 100644
--- a/sound/usb/misc/ua101.c
+++ b/sound/usb/misc/ua101.c
@@ -42,7 +42,7 @@ MODULE_SUPPORTED_DEVICE("{{Edirol,UA-101},{Edirol,UA-1000}}");
42/* 42/*
43 * This magic value optimizes memory usage efficiency for the UA-101's packet 43 * This magic value optimizes memory usage efficiency for the UA-101's packet
44 * sizes at all sample rates, taking into account the stupid cache pool sizes 44 * sizes at all sample rates, taking into account the stupid cache pool sizes
45 * that usb_buffer_alloc() uses. 45 * that usb_alloc_coherent() uses.
46 */ 46 */
47#define DEFAULT_QUEUE_LENGTH 21 47#define DEFAULT_QUEUE_LENGTH 21
48 48
@@ -1057,7 +1057,7 @@ static int alloc_stream_buffers(struct ua101 *ua, struct ua101_stream *stream)
1057 (unsigned int)MAX_QUEUE_LENGTH); 1057 (unsigned int)MAX_QUEUE_LENGTH);
1058 1058
1059 /* 1059 /*
1060 * The cache pool sizes used by usb_buffer_alloc() (128, 512, 2048) are 1060 * The cache pool sizes used by usb_alloc_coherent() (128, 512, 2048) are
1061 * quite bad when used with the packet sizes of this device (e.g. 280, 1061 * quite bad when used with the packet sizes of this device (e.g. 280,
1062 * 520, 624). Therefore, we allocate and subdivide entire pages, using 1062 * 520, 624). Therefore, we allocate and subdivide entire pages, using
1063 * a smaller buffer only for the last chunk. 1063 * a smaller buffer only for the last chunk.
@@ -1068,8 +1068,8 @@ static int alloc_stream_buffers(struct ua101 *ua, struct ua101_stream *stream)
1068 packets = min(remaining_packets, packets_per_page); 1068 packets = min(remaining_packets, packets_per_page);
1069 size = packets * stream->max_packet_bytes; 1069 size = packets * stream->max_packet_bytes;
1070 stream->buffers[i].addr = 1070 stream->buffers[i].addr =
1071 usb_buffer_alloc(ua->dev, size, GFP_KERNEL, 1071 usb_alloc_coherent(ua->dev, size, GFP_KERNEL,
1072 &stream->buffers[i].dma); 1072 &stream->buffers[i].dma);
1073 if (!stream->buffers[i].addr) 1073 if (!stream->buffers[i].addr)
1074 return -ENOMEM; 1074 return -ENOMEM;
1075 stream->buffers[i].size = size; 1075 stream->buffers[i].size = size;
@@ -1089,10 +1089,10 @@ static void free_stream_buffers(struct ua101 *ua, struct ua101_stream *stream)
1089 unsigned int i; 1089 unsigned int i;
1090 1090
1091 for (i = 0; i < ARRAY_SIZE(stream->buffers); ++i) 1091 for (i = 0; i < ARRAY_SIZE(stream->buffers); ++i)
1092 usb_buffer_free(ua->dev, 1092 usb_free_coherent(ua->dev,
1093 stream->buffers[i].size, 1093 stream->buffers[i].size,
1094 stream->buffers[i].addr, 1094 stream->buffers[i].addr,
1095 stream->buffers[i].dma); 1095 stream->buffers[i].dma);
1096} 1096}
1097 1097
1098static int alloc_stream_urbs(struct ua101 *ua, struct ua101_stream *stream, 1098static int alloc_stream_urbs(struct ua101 *ua, struct ua101_stream *stream,