summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/ttusb-dec
diff options
context:
space:
mode:
authorAlex Woods <devnull@localhost>2004-05-03 16:36:31 +0000
committerAlex Woods <devnull@localhost>2004-05-03 16:36:31 +0000
commitbc9d48fabba539dbafe275a77d9458ea2f1dbcb1 (patch)
tree78da797a31b25ce1b92614c248404d16894a8dc6 /linux/drivers/media/dvb/ttusb-dec
parente3818a98c2c013a059a973e1cac86a5f9462da64 (diff)
downloadmediapointer-dvb-s2-bc9d48fabba539dbafe275a77d9458ea2f1dbcb1.tar.gz
mediapointer-dvb-s2-bc9d48fabba539dbafe275a77d9458ea2f1dbcb1.tar.bz2
Remove 2.4 compat code
Diffstat (limited to 'linux/drivers/media/dvb/ttusb-dec')
-rw-r--r--linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c87
1 files changed, 0 insertions, 87 deletions
diff --git a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c
index de9d364a2..170b9bc9d 100644
--- a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c
+++ b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c
@@ -28,9 +28,7 @@
#include <linux/usb.h>
#include <linux/version.h>
#include <linux/interrupt.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
#include <linux/firmware.h>
-#endif
#if defined(CONFIG_CRC32) || defined(CONFIG_CRC32_MODULE)
#include <linux/crc32.h>
#else
@@ -700,11 +698,7 @@ static void ttusb_dec_process_urb_frame_list(unsigned long data)
}
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-static void ttusb_dec_process_urb(struct urb *urb)
-#else
static void ttusb_dec_process_urb(struct urb *urb, struct pt_regs *ptregs)
-#endif
{
struct ttusb_dec *dec = urb->context;
@@ -712,13 +706,7 @@ static void ttusb_dec_process_urb(struct urb *urb, struct pt_regs *ptregs)
int i;
for (i = 0; i < FRAMES_PER_ISO_BUF; i++) {
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20)
- piso_packet_descriptor_t d;
-#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- struct iso_packet_descriptor *d;
-#else
struct usb_iso_packet_descriptor *d;
-#endif
u8 *b;
int length;
struct urb_frame *frame;
@@ -751,10 +739,8 @@ static void ttusb_dec_process_urb(struct urb *urb, struct pt_regs *ptregs)
urb->status);
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
if (dec->iso_stream_count)
usb_submit_urb(urb, GFP_ATOMIC);
-#endif
}
static void ttusb_dec_setup_urbs(struct ttusb_dec *dec)
@@ -771,12 +757,8 @@ static void ttusb_dec_setup_urbs(struct ttusb_dec *dec)
urb->context = dec;
urb->complete = ttusb_dec_process_urb;
urb->pipe = dec->in_pipe;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
urb->transfer_flags = URB_ISO_ASAP;
urb->interval = 1;
-#else
- urb->transfer_flags = USB_ISO_ASAP;
-#endif
urb->number_of_packets = FRAMES_PER_ISO_BUF;
urb->transfer_buffer_length = ISO_FRAME_SIZE *
FRAMES_PER_ISO_BUF;
@@ -863,12 +845,8 @@ static int ttusb_dec_start_iso_xfer(struct ttusb_dec *dec)
dec->next_packet_id = 0;
for (i = 0; i < ISO_BUF_COUNT; i++) {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
if ((result = usb_submit_urb(dec->iso_urb[i],
GFP_ATOMIC))) {
-#else
- if ((result = usb_submit_urb(dec->iso_urb[i]))) {
-#endif
printk("%s: failed urb submission %d: "
"error %d\n", __FUNCTION__, i, result);
@@ -1127,11 +1105,7 @@ static int ttusb_dec_alloc_iso_urbs(struct ttusb_dec *dec)
for (i = 0; i < ISO_BUF_COUNT; i++) {
struct urb *urb;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
if (!(urb = usb_alloc_urb(FRAMES_PER_ISO_BUF, GFP_ATOMIC))) {
-#else
- if (!(urb = usb_alloc_urb(FRAMES_PER_ISO_BUF))) {
-#endif
ttusb_dec_free_iso_urbs(dec);
return -ENOMEM;
}
@@ -1141,13 +1115,6 @@ static int 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;
}
@@ -1184,12 +1151,6 @@ static void ttusb_dec_init_usb(struct ttusb_dec *dec)
ttusb_dec_alloc_iso_urbs(dec);
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-#include "dsp_dec2000t.h"
-#include "dsp_dec2540t.h"
-#include "dsp_dec3000s.h"
-#endif
-
static int ttusb_dec_boot_dsp(struct ttusb_dec *dec)
{
int i, j, actual_len, result, size, trans_count;
@@ -1207,13 +1168,10 @@ static int ttusb_dec_boot_dsp(struct ttusb_dec *dec)
#if defined(CONFIG_CRC32) || defined(CONFIG_CRC32_MODULE)
u32 crc32_csum, crc32_check, tmp;
#endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
const struct firmware *fw_entry = NULL;
-#endif
dprintk("%s\n", __FUNCTION__);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
if (request_firmware(&fw_entry, dec->firmware_name, &dec->udev->dev)) {
printk(KERN_ERR "%s: Firmware (%s) unavailable.\n",
__FUNCTION__, dec->firmware_name);
@@ -1222,24 +1180,6 @@ static int ttusb_dec_boot_dsp(struct ttusb_dec *dec)
firmware = fw_entry->data;
firmware_size = fw_entry->size;
-#else
- switch (dec->model) {
- case TTUSB_DEC2000T:
- firmware = &dsp_dec2000t[0];
- firmware_size = sizeof(dsp_dec2000t);
- break;
-
- case TTUSB_DEC2540T:
- firmware = &dsp_dec2540t[0];
- firmware_size = sizeof(dsp_dec2540t);
- break;
-
- case TTUSB_DEC3000S:
- firmware = &dsp_dec3000s[0];
- firmware_size = sizeof(dsp_dec3000s);
- break;
- }
-#endif
if (firmware_size < 60) {
printk("%s: firmware size too small for DSP code (%u < 60).\n",
@@ -1765,22 +1705,6 @@ static void ttusb_dec_exit_filters(struct ttusb_dec *dec)
}
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-static void *ttusb_dec_probe(struct usb_device *udev, unsigned int ifnum,
- const struct usb_device_id *id)
-{
- struct ttusb_dec *dec;
-
- dprintk("%s\n", __FUNCTION__);
-
- if (ifnum != 0)
- return NULL;
-
- if (!(dec = kmalloc(sizeof(struct ttusb_dec), GFP_KERNEL))) {
- printk("%s: couldn't allocate memory.\n", __FUNCTION__);
- return NULL;
- }
-#else
static int ttusb_dec_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
@@ -1797,7 +1721,6 @@ static int ttusb_dec_probe(struct usb_interface *intf,
}
usb_set_intfdata(intf, (void *)dec);
-#endif
memset(dec, 0, sizeof(struct ttusb_dec));
@@ -1832,24 +1755,14 @@ static int ttusb_dec_probe(struct usb_interface *intf,
ttusb_dec_set_interface(dec, TTUSB_DEC_INTERFACE_IN);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- return (void *)dec;
-#else
return 0;
-#endif
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-static void ttusb_dec_disconnect(struct usb_device *udev, void *data)
-{
- struct ttusb_dec *dec = data;
-#else
static void ttusb_dec_disconnect(struct usb_interface *intf)
{
struct ttusb_dec *dec = usb_get_intfdata(intf);
usb_set_intfdata(intf, NULL);
-#endif
dprintk("%s\n", __FUNCTION__);