diff options
Diffstat (limited to 'linux')
4 files changed, 25 insertions, 39 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_compat.h b/linux/drivers/media/dvb/dvb-core/dvb_compat.h index ae64b6632..71488ab6e 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_compat.h +++ b/linux/drivers/media/dvb/dvb-core/dvb_compat.h @@ -110,9 +110,10 @@ extern struct page * vmalloc_to_page(void *addr); #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) typedef struct iso_packet_descriptor usb_iso_packet_descriptor; #define URB_ISO_ASAP USB_ISO_ASAP -#define URB_MEM_FLAG -#else -#define URB_MEM_FLAG , GFP_KERNEL +#undef usb_alloc_urb +#undef usb_submit_urb +#define usb_alloc_urb(urb,flags) usb_alloc_urb(urb) +#define usb_submit_urb(urb,flags) usb_submit_urb(urb) #endif #endif 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 4dfd8173c..dd1454e41 100644 --- a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c +++ b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c @@ -125,8 +125,9 @@ struct ttusb { int filterstate[TTUSB_MAXFILTER]; /* 0: not busy, 1: busy */ #endif } channel[TTUSB_MAXCHANNEL]; - +#if 0 devfs_handle_t stc_devfs_handle; +#endif }; /* ugly workaround ... don't know why it's neccessary to read */ @@ -774,9 +775,7 @@ void ttusb_iso_irq (struct urb *urb, struct pt_regs *ptregs) } } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) - usb_submit_urb(urb URB_MEM_FLAG); -#endif + usb_submit_urb(urb, GFP_KERNEL); } @@ -809,7 +808,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 URB_MEM_FLAG))) { + if (!(urb = usb_alloc_urb (FRAMES_PER_ISO_BUF, GFP_KERNEL))) { ttusb_free_iso_urbs (ttusb); return -ENOMEM; } @@ -868,15 +867,8 @@ 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] URB_MEM_FLAG))) { + if ((err = usb_submit_urb(ttusb->iso_urb[i], GFP_KERNEL))) { ttusb_stop_iso_xfer (ttusb); printk ("%s: failed urb submission (%i: err = %i)!\n", __FUNCTION__, i, err); @@ -1018,6 +1010,8 @@ int ttusb_setup_interfaces (struct ttusb *ttusb) return 0; } + +#if 0 static u8 stc_firmware[8192]; static @@ -1068,6 +1062,7 @@ struct file_operations stc_fops = { .open = stc_open, .release = stc_release, }; +#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) @@ -1104,8 +1099,6 @@ int ttusb_probe (struct usb_interface *intf, #endif -// MOD_INC_USE_COUNT; - memset (ttusb, 0, sizeof(struct ttusb)); for (channel=0; channel < TTUSB_MAXCHANNEL; ++channel) { @@ -1168,6 +1161,7 @@ int ttusb_probe (struct usb_interface *intf, } err: +#if 0 ttusb->stc_devfs_handle = devfs_register( ttusb->adapter->devfs_handle, TTUSB_BUDGET_NAME, @@ -1175,7 +1169,7 @@ err: S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH, &stc_fops, ttusb); - +#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) return (void*) ttusb; #else @@ -1208,8 +1202,9 @@ void ttusb_disconnect (struct usb_interface *intf) #undef devfs_remove #define devfs_remove(x) devfs_unregister(ttusb->stc_devfs_handle); #endif +#if 0 devfs_remove(TTUSB_BUDGET_NAME); - +#endif ttusb->dvb_demux.dmx.close(&ttusb->dvb_demux.dmx); dvb_net_release(&ttusb->dvbnet); dvb_dmxdev_release(&ttusb->dmxdev); @@ -1222,8 +1217,6 @@ void ttusb_disconnect (struct usb_interface *intf) kfree (ttusb); -// MOD_DEC_USE_COUNT; - dprintk ("%s: TTUSB DVB disconnected\n", __FUNCTION__); } diff --git a/linux/drivers/media/dvb/ttusb-dec/dec2000_frontend.c b/linux/drivers/media/dvb/ttusb-dec/dec2000_frontend.c index 4a8ae58ff..fd07e7b4c 100644 --- a/linux/drivers/media/dvb/ttusb-dec/dec2000_frontend.c +++ b/linux/drivers/media/dvb/ttusb-dec/dec2000_frontend.c @@ -19,8 +19,11 @@ * */ +#include <linux/init.h> +#include <linux/module.h> + #include "dvb_frontend.h" -#include "dvb_compat.h" +#include "dvb_functions.h" static int debug = 0; @@ -192,3 +195,4 @@ MODULE_LICENSE("GPL"); MODULE_PARM(debug, "i"); MODULE_PARM_DESC(debug, "Debug level"); + diff --git a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c index 9ab8baeee..b86dcc616 100644 --- a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c +++ b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c @@ -25,7 +25,7 @@ #include <linux/usb.h> #include "ttusb_dec.h" -#include "dvb_compat.h" +#include "dvb_functions.h" #include "dvb_frontend.h" static int debug = 0; @@ -470,10 +470,7 @@ ttusb_dec_process_urb(struct urb *urb, struct pt_regs *ptregs) } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) - usb_submit_urb(urb URB_MEM_FLAG); -#endif - + usb_submit_urb(urb, GFP_KERNEL); } static void @@ -576,7 +573,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] URB_MEM_FLAG))) { + if ((result = usb_submit_urb(dec->iso_urb[i], GFP_KERNEL))) { printk("%s: failed urb submission %d: error %d\n", __FUNCTION__, i, result); @@ -762,7 +759,7 @@ ttusb_dec_alloc_iso_urbs(struct ttusb_dec * dec) struct urb *urb; - if (!(urb = usb_alloc_urb(FRAMES_PER_ISO_BUF URB_MEM_FLAG))) { + if (!(urb = usb_alloc_urb(FRAMES_PER_ISO_BUF, GFP_KERNEL))) { ttusb_dec_free_iso_urbs(dec); return -ENOMEM; @@ -775,15 +772,6 @@ 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; } |