diff options
author | Guido Guenther <agx@sigxcpu.org> | 2005-11-16 03:08:44 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-11-16 03:08:44 -0500 |
commit | 574780d56fdafe2c8ea98660a932760dfea9bffc (patch) | |
tree | 492e34919f14ffede70dae0ac6f0414fa701d564 | |
parent | f6ff56cd56b83d8edf4b3cffc5c53c56b37a5081 (diff) |
[SPARC64]: Oops in pci_alloc_consistent with cingergyT2
From: Guido Guenther <agx@sigxcpu.org>
- Use correct API for allocating and freeing DMA buffers.
Acked-by: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/media/dvb/cinergyT2/cinergyT2.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/media/dvb/cinergyT2/cinergyT2.c b/drivers/media/dvb/cinergyT2/cinergyT2.c index a1607e7d6d6b..2dfd7cd160de 100644 --- a/drivers/media/dvb/cinergyT2/cinergyT2.c +++ b/drivers/media/dvb/cinergyT2/cinergyT2.c | |||
@@ -276,7 +276,7 @@ static void cinergyt2_free_stream_urbs (struct cinergyt2 *cinergyt2) | |||
276 | if (cinergyt2->stream_urb[i]) | 276 | if (cinergyt2->stream_urb[i]) |
277 | usb_free_urb(cinergyt2->stream_urb[i]); | 277 | usb_free_urb(cinergyt2->stream_urb[i]); |
278 | 278 | ||
279 | pci_free_consistent(NULL, STREAM_URB_COUNT*STREAM_BUF_SIZE, | 279 | usb_buffer_free(cinergyt2->udev, STREAM_URB_COUNT*STREAM_BUF_SIZE, |
280 | cinergyt2->streambuf, cinergyt2->streambuf_dmahandle); | 280 | cinergyt2->streambuf, cinergyt2->streambuf_dmahandle); |
281 | } | 281 | } |
282 | 282 | ||
@@ -284,9 +284,8 @@ static int cinergyt2_alloc_stream_urbs (struct cinergyt2 *cinergyt2) | |||
284 | { | 284 | { |
285 | int i; | 285 | int i; |
286 | 286 | ||
287 | cinergyt2->streambuf = pci_alloc_consistent(NULL, | 287 | cinergyt2->streambuf = usb_buffer_alloc(cinergyt2->udev, STREAM_URB_COUNT*STREAM_BUF_SIZE, |
288 | STREAM_URB_COUNT*STREAM_BUF_SIZE, | 288 | SLAB_KERNEL, &cinergyt2->streambuf_dmahandle); |
289 | &cinergyt2->streambuf_dmahandle); | ||
290 | if (!cinergyt2->streambuf) { | 289 | if (!cinergyt2->streambuf) { |
291 | dprintk(1, "failed to alloc consistent stream memory area, bailing out!\n"); | 290 | dprintk(1, "failed to alloc consistent stream memory area, bailing out!\n"); |
292 | return -ENOMEM; | 291 | return -ENOMEM; |