summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/ttusb-budget
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/dvb/ttusb-budget')
-rw-r--r--linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
index dd1454e41..a06658303 100644
--- a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
+++ b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
@@ -28,6 +28,7 @@
#include <linux/dvb/dmx.h>
#include <linux/pci.h>
+#include "dvb_usb_compat.h"
#include "dvb_functions.h"
/*
@@ -775,7 +776,9 @@ void ttusb_iso_irq (struct urb *urb, struct pt_regs *ptregs)
}
}
- usb_submit_urb(urb, GFP_KERNEL);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+ usb_submit_urb(urb URB_MEM_FLAG);
+#endif
}
@@ -808,7 +811,7 @@ int ttusb_alloc_iso_urbs (struct ttusb *ttusb)
for (i=0; i<ISO_BUF_COUNT; i++) {
struct urb *urb;
- if (!(urb = usb_alloc_urb (FRAMES_PER_ISO_BUF, GFP_KERNEL))) {
+ if (!(urb = usb_alloc_urb (FRAMES_PER_ISO_BUF URB_MEM_FLAG))) {
ttusb_free_iso_urbs (ttusb);
return -ENOMEM;
}
@@ -867,8 +870,15 @@ int ttusb_start_iso_xfer (struct ttusb *ttusb)
}
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+ for (i=0; i<ISO_BUF_COUNT; i++) {
+ int next = (i + 1) % ISO_BUF_COUNT;
+ ttusb->iso_urb[i]->next = ttusb->iso_urb[next];
+ }
+#endif
+
for (i=0; i<ISO_BUF_COUNT; i++) {
- if ((err = usb_submit_urb(ttusb->iso_urb[i], GFP_KERNEL))) {
+ if ((err = usb_submit_urb (ttusb->iso_urb[i] URB_MEM_FLAG))) {
ttusb_stop_iso_xfer (ttusb);
printk ("%s: failed urb submission (%i: err = %i)!\n",
__FUNCTION__, i, err);