summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/ttusb-budget
diff options
context:
space:
mode:
authorMichael Hunold <devnull@localhost>2004-05-03 16:29:27 +0000
committerMichael Hunold <devnull@localhost>2004-05-03 16:29:27 +0000
commit1a037915cb36b4ddcad3eed662e8302ca48e6b86 (patch)
treefd50fe4977e792c809864fc32455e975a1ea4b30 /linux/drivers/media/dvb/ttusb-budget
parent30970c2a967560590b306f6965aea609d7fd3a54 (diff)
downloadmediapointer-dvb-s2-1a037915cb36b4ddcad3eed662e8302ca48e6b86.tar.gz
mediapointer-dvb-s2-1a037915cb36b4ddcad3eed662e8302ca48e6b86.tar.bz2
- remove 2.4 compat code, expect for ttusb_dec.c
(Alex, do you take care of that one?)
Diffstat (limited to 'linux/drivers/media/dvb/ttusb-budget')
-rw-r--r--linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c61
1 files changed, 3 insertions, 58 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 7599e0b2e..ff22dd7d0 100644
--- a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
+++ b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
@@ -9,7 +9,6 @@
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*/
-#include <linux/version.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/wait.h>
@@ -29,7 +28,6 @@
#include <linux/dvb/dmx.h>
#include <linux/pci.h>
-#include "dvb_usb_compat.h"
#include "dvb_functions.h"
/*
@@ -748,11 +746,7 @@ static void ttusb_process_frame(struct ttusb *ttusb, u8 * data, int len)
}
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-static void ttusb_iso_irq(struct urb *urb)
-#else
static void ttusb_iso_irq(struct urb *urb, struct pt_regs *ptregs)
-#endif
{
struct ttusb *ttusb = urb->context;
@@ -793,9 +787,7 @@ static void ttusb_iso_irq(struct urb *urb, struct pt_regs *ptregs)
ttusb_process_frame(ttusb, data, len);
}
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
- usb_submit_urb(urb URB_MEM_FLAG);
-#endif
+ usb_submit_urb(urb, GFP_ATOMIC);
}
static void ttusb_free_iso_urbs(struct ttusb *ttusb)
@@ -830,7 +822,7 @@ static int ttusb_alloc_iso_urbs(struct ttusb *ttusb)
if (!
(urb =
- usb_alloc_urb(FRAMES_PER_ISO_BUF URB_MEM_FLAG))) {
+ usb_alloc_urb(FRAMES_PER_ISO_BUF, GFP_ATOMIC))) {
ttusb_free_iso_urbs(ttusb);
return -ENOMEM;
}
@@ -873,9 +865,7 @@ static int ttusb_start_iso_xfer(struct ttusb *ttusb)
urb->complete = ttusb_iso_irq;
urb->pipe = ttusb->isoc_in_pipe;
urb->transfer_flags = URB_ISO_ASAP;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
urb->interval = 1;
-#endif
urb->number_of_packets = FRAMES_PER_ISO_BUF;
urb->transfer_buffer_length =
ISO_FRAME_SIZE * FRAMES_PER_ISO_BUF;
@@ -889,15 +879,8 @@ static 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_ATOMIC))) {
ttusb_stop_iso_xfer(ttusb);
printk
("%s: failed urb submission (%i: err = %i)!\n",
@@ -1027,9 +1010,6 @@ static int ttusb_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
static int ttusb_setup_interfaces(struct ttusb *ttusb)
{
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- usb_set_configuration(ttusb->dev, 1);
-#endif
usb_set_interface(ttusb->dev, 1, 1);
ttusb->bulk_out_pipe = usb_sndbulkpipe(ttusb->dev, 1);
@@ -1088,22 +1068,6 @@ static struct file_operations stc_fops = {
};
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-static void *ttusb_probe(struct usb_device *udev, unsigned int ifnum,
- const struct usb_device_id *id)
-{
- struct ttusb *ttusb;
- int result, channel;
-
- if (ifnum != 0)
- return NULL;
-
- dprintk("%s: TTUSB DVB connected\n", __FUNCTION__);
-
- if (!(ttusb = kmalloc(sizeof(struct ttusb), GFP_KERNEL)))
- return NULL;
-
-#else
static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *id)
{
struct usb_device *udev;
@@ -1119,8 +1083,6 @@ static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *i
if (!(ttusb = kmalloc(sizeof(struct ttusb), GFP_KERNEL)))
return -ENOMEM;
-#endif
-
memset(ttusb, 0, sizeof(struct ttusb));
for (channel = 0; channel < TTUSB_MAXCHANNEL; ++channel) {
@@ -1193,38 +1155,21 @@ static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *i
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
usb_set_intfdata(intf, (void *) ttusb);
return 0;
-#endif
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-static void ttusb_disconnect(struct usb_device *udev, void *data)
-{
- struct ttusb *ttusb = data;
-#else
static void ttusb_disconnect(struct usb_interface *intf)
{
struct ttusb *ttusb = usb_get_intfdata(intf);
usb_set_intfdata(intf, NULL);
-#endif
ttusb->disconnecting = 1;
ttusb_stop_iso_xfer(ttusb);
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,69))
-#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);