summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Krufky <devnull@localhost>2005-11-28 00:54:41 +0000
committerMichael Krufky <devnull@localhost>2005-11-28 00:54:41 +0000
commit366fa3f925732b0a7025aed81794018c4f227173 (patch)
tree991165b2dc2859c0ca5e9f772e16a83f415dc991
parent36e36ed98b4c3b6881c3cf783eadbb798d357467 (diff)
downloadmediapointer-dvb-s2-366fa3f925732b0a7025aed81794018c4f227173.tar.gz
mediapointer-dvb-s2-366fa3f925732b0a7025aed81794018c4f227173.tar.bz2
kernel-sync
[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> Signed-off-by: Michael Krufky <mkrufky@m1k.net>
-rw-r--r--linux/drivers/media/dvb/cinergyT2/cinergyT2.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
index 47bfac557..c2ca56109 100644
--- a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
+++ b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
@@ -278,7 +278,7 @@ static void cinergyt2_free_stream_urbs (struct cinergyt2 *cinergyt2)
if (cinergyt2->stream_urb[i])
usb_free_urb(cinergyt2->stream_urb[i]);
- pci_free_consistent(NULL, STREAM_URB_COUNT*STREAM_BUF_SIZE,
+ usb_buffer_free(cinergyt2->udev, STREAM_URB_COUNT*STREAM_BUF_SIZE,
cinergyt2->streambuf, cinergyt2->streambuf_dmahandle);
}
@@ -286,9 +286,8 @@ static int cinergyt2_alloc_stream_urbs (struct cinergyt2 *cinergyt2)
{
int i;
- cinergyt2->streambuf = pci_alloc_consistent(NULL,
- STREAM_URB_COUNT*STREAM_BUF_SIZE,
- &cinergyt2->streambuf_dmahandle);
+ cinergyt2->streambuf = usb_buffer_alloc(cinergyt2->udev, STREAM_URB_COUNT*STREAM_BUF_SIZE,
+ SLAB_KERNEL, &cinergyt2->streambuf_dmahandle);
if (!cinergyt2->streambuf) {
dprintk(1, "failed to alloc consistent stream memory area, bailing out!\n");
return -ENOMEM;