[SPARC64]: Oops in pci_alloc_consistent with cingergyT2
authorGuido Guenther <agx@sigxcpu.org>
Wed, 16 Nov 2005 08:08:44 +0000 (00:08 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Nov 2005 08:08:44 +0000 (00:08 -0800)
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>
drivers/media/dvb/cinergyT2/cinergyT2.c

index a1607e7d6d6bfba74eddb9798d42de0b16f69aa8..2dfd7cd160deabb8bf7ba276f6dde3c19b0ecfe7 100644 (file)
@@ -276,7 +276,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);
 }
 
@@ -284,9 +284,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;
This page took 0.025347 seconds and 5 git commands to generate.