summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/dvb-usb
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/dvb/dvb-usb')
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dvb-usb-urb.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-urb.c b/linux/drivers/media/dvb/dvb-usb/dvb-usb-urb.c
index e691f6036..99ea3c510 100644
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-urb.c
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-urb.c
@@ -8,8 +8,6 @@
*/
#include "dvb-usb-common.h"
-#include <linux/pci.h>
-
int dvb_usb_generic_rw(struct dvb_usb_device *d, u8 *wbuf, u16 wlen, u8 *rbuf,
u16 rlen, int delay_ms)
{
@@ -128,7 +126,7 @@ static int dvb_usb_bulk_urb_init(struct dvb_usb_device *d)
deb_info("allocate %d bytes as buffersize for all URBs\n",bufsize);
/* allocate the actual buffer for the URBs */
- if ((d->buffer = pci_alloc_consistent(NULL,bufsize,&d->dma_handle)) == NULL) {
+ if ((d->buffer = usb_buffer_alloc(d->udev, bufsize, SLAB_ATOMIC, &d->dma_handle)) == NULL) {
deb_info("not enough memory for urb-buffer allocation.\n");
return -ENOMEM;
}
@@ -207,9 +205,8 @@ int dvb_usb_urb_exit(struct dvb_usb_device *d)
}
if (d->state & DVB_USB_STATE_URB_BUF)
- pci_free_consistent(NULL,
- d->props.urb.u.bulk.buffersize * d->props.urb.count,
- d->buffer,d->dma_handle);
+ usb_buffer_free(d->udev, d->props.urb.u.bulk.buffersize * d->props.urb.count,
+ d->buffer, d->dma_handle);
d->state &= ~DVB_USB_STATE_URB_BUF;
return 0;