From: Guido Guenther Date: Wed, 16 Nov 2005 08:08:44 +0000 (-0800) Subject: [SPARC64]: Oops in pci_alloc_consistent with cingergyT2 X-Git-Tag: v2.6.15-rc2~73^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=574780d56fdafe2c8ea98660a932760dfea9bffc;p=profile%2Fivi%2Fkernel-x86-ivi.git [SPARC64]: Oops in pci_alloc_consistent with cingergyT2 From: Guido Guenther - Use correct API for allocating and freeing DMA buffers. Acked-by: Johannes Stezenbach Signed-off-by: Andrew Morton Signed-off-by: David S. Miller --- diff --git a/drivers/media/dvb/cinergyT2/cinergyT2.c b/drivers/media/dvb/cinergyT2/cinergyT2.c index a1607e7..2dfd7cd 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) 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;