diff options
author | Alex Woods <devnull@localhost> | 2003-06-22 12:14:46 +0000 |
---|---|---|
committer | Alex Woods <devnull@localhost> | 2003-06-22 12:14:46 +0000 |
commit | 5f49c5a0e30a742f8607e0a4e744587db8ed3a00 (patch) | |
tree | 2b6a52e239f41f507aa69c394d6a0b910f92de81 /linux/drivers/media/dvb/ttusb-budget | |
parent | fa424863e7af7e98d93fd296469a86ef6cfddbe5 (diff) | |
download | mediapointer-dvb-s2-5f49c5a0e30a742f8607e0a4e744587db8ed3a00.tar.gz mediapointer-dvb-s2-5f49c5a0e30a742f8607e0a4e744587db8ed3a00.tar.bz2 |
Rollback to munges and split usb compat stuff out to fix building
against 2.4 and 2.5 kernels.
Diffstat (limited to 'linux/drivers/media/dvb/ttusb-budget')
-rw-r--r-- | linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c | 16 |
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); |