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-dec/ttusb_dec.c | |
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-dec/ttusb_dec.c')
-rw-r--r-- | linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c index b86dcc616..933922002 100644 --- a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c +++ b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c @@ -25,8 +25,8 @@ #include <linux/usb.h> #include "ttusb_dec.h" -#include "dvb_functions.h" #include "dvb_frontend.h" +#include "dvb_usb_compat.h" static int debug = 0; @@ -470,7 +470,10 @@ ttusb_dec_process_urb(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 + } static void @@ -573,7 +576,7 @@ ttusb_dec_start_iso_xfer(struct ttusb_dec *dec) for (i = 0; i < ISO_BUF_COUNT; i++) { - if ((result = usb_submit_urb(dec->iso_urb[i], GFP_KERNEL))) { + if ((result = usb_submit_urb(dec->iso_urb[i] URB_MEM_FLAG))) { printk("%s: failed urb submission %d: error %d\n", __FUNCTION__, i, result); @@ -759,7 +762,7 @@ ttusb_dec_alloc_iso_urbs(struct ttusb_dec * dec) 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_dec_free_iso_urbs(dec); return -ENOMEM; @@ -772,6 +775,15 @@ ttusb_dec_alloc_iso_urbs(struct ttusb_dec * dec) ttusb_dec_setup_urbs(dec); +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) + for (i = 0; i < ISO_BUF_COUNT; i++) { + + int next = (i + 1) % ISO_BUF_COUNT; + dec->iso_urb[i]->next = dec->iso_urb[next]; + + } +#endif + return 0; } |