summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/dvb-usb
diff options
context:
space:
mode:
authorPatrick Boettcher <devnull@localhost>2005-04-29 17:13:44 +0000
committerPatrick Boettcher <devnull@localhost>2005-04-29 17:13:44 +0000
commit64e484160c41e31c43be70d313f968bce1b56f93 (patch)
treee7fa871db4a4cfedd6bc98dba93b3a4e74f2f4a4 /linux/drivers/media/dvb/dvb-usb
parent9c21fd640621a3b55eeea528ed0b12e941a9ea43 (diff)
downloadmediapointer-dvb-s2-64e484160c41e31c43be70d313f968bce1b56f93.tar.gz
mediapointer-dvb-s2-64e484160c41e31c43be70d313f968bce1b56f93.tar.bz2
using usb_buffer_(alloc|free) instead of pci_(free|alloc)_consistent as
suggested by Johannes some time ago
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;