summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/dvb')
-rw-r--r--linux/drivers/media/dvb/b2c2/flexcop-pci.c17
-rw-r--r--linux/drivers/media/dvb/cinergyT2/cinergyT2.c36
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_frontend.c5
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_net.c31
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c13
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dvb-usb.h4
6 files changed, 105 insertions, 1 deletions
diff --git a/linux/drivers/media/dvb/b2c2/flexcop-pci.c b/linux/drivers/media/dvb/b2c2/flexcop-pci.c
index e6362f304..648f319b2 100644
--- a/linux/drivers/media/dvb/b2c2/flexcop-pci.c
+++ b/linux/drivers/media/dvb/b2c2/flexcop-pci.c
@@ -63,7 +63,11 @@ struct flexcop_pci {
unsigned long last_irq;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
struct work_struct irq_check_work;
+#else
+ struct delayed_work irq_check_work;
+#endif
struct flexcop_device *fc_dev;
};
@@ -97,9 +101,18 @@ static int flexcop_pci_write_ibi_reg(struct flexcop_device *fc, flexcop_ibi_regi
return 0;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
static void flexcop_pci_irq_check_work(void *data)
+#else
+static void flexcop_pci_irq_check_work(struct work_struct *work)
+#endif
{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
struct flexcop_pci *fc_pci = data;
+#else
+ struct flexcop_pci *fc_pci =
+ container_of(work, struct flexcop_pci, irq_check_work.work);
+#endif
struct flexcop_device *fc = fc_pci->fc_dev;
flexcop_ibi_value v = fc->read_ibi_reg(fc,sram_dest_reg_714);
@@ -375,7 +388,11 @@ static int flexcop_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
if ((ret = flexcop_pci_dma_init(fc_pci)) != 0)
goto err_fc_exit;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
INIT_WORK(&fc_pci->irq_check_work, flexcop_pci_irq_check_work, fc_pci);
+#else
+ INIT_DELAYED_WORK(&fc_pci->irq_check_work, flexcop_pci_irq_check_work);
+#endif
return ret;
diff --git a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
index 7c655b705..a33f82910 100644
--- a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
+++ b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
@@ -144,7 +144,11 @@ struct cinergyt2 {
struct dvbt_set_parameters_msg param;
struct dvbt_get_status_msg status;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
struct work_struct query_work;
+#else
+ struct delayed_work query_work;
+#endif
wait_queue_head_t poll_wq;
int pending_fe_events;
@@ -158,7 +162,11 @@ struct cinergyt2 {
#ifdef ENABLE_RC
struct input_dev *rc_input_dev;
char phys[64];
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
struct work_struct rc_query_work;
+#else
+ struct delayed_work rc_query_work;
+#endif
int rc_input_event;
u32 rc_last_code;
unsigned long last_event_jiffies;
@@ -311,7 +319,7 @@ static int cinergyt2_alloc_stream_urbs (struct cinergyt2 *cinergyt2)
int i;
cinergyt2->streambuf = usb_buffer_alloc(cinergyt2->udev, STREAM_URB_COUNT*STREAM_BUF_SIZE,
- SLAB_KERNEL, &cinergyt2->streambuf_dmahandle);
+ GFP_KERNEL, &cinergyt2->streambuf_dmahandle);
if (!cinergyt2->streambuf) {
dprintk(1, "failed to alloc consistent stream memory area, bailing out!\n");
return -ENOMEM;
@@ -747,9 +755,18 @@ static struct dvb_device cinergyt2_fe_template = {
#ifdef ENABLE_RC
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
static void cinergyt2_query_rc (void *data)
+#else
+static void cinergyt2_query_rc (struct work_struct *work)
+#endif
{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
struct cinergyt2 *cinergyt2 = data;
+#else
+ struct cinergyt2 *cinergyt2 =
+ container_of(work, struct cinergyt2, rc_query_work.work);
+#endif
char buf[1] = { CINERGYT2_EP1_GET_RC_EVENTS };
struct cinergyt2_rc_event rc_events[12];
int n, len, i;
@@ -833,7 +850,11 @@ static int cinergyt2_register_rc(struct cinergyt2 *cinergyt2)
strlcat(cinergyt2->phys, "/input0", sizeof(cinergyt2->phys));
cinergyt2->rc_input_event = KEY_MAX;
cinergyt2->rc_last_code = ~0;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
INIT_WORK(&cinergyt2->rc_query_work, cinergyt2_query_rc, cinergyt2);
+#else
+ INIT_DELAYED_WORK(&cinergyt2->rc_query_work, cinergyt2_query_rc);
+#endif
input_dev->name = DRIVER_NAME " remote control";
input_dev->phys = cinergyt2->phys;
@@ -880,9 +901,18 @@ static inline void cinergyt2_resume_rc(struct cinergyt2 *cinergyt2) { }
#endif /* ENABLE_RC */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
static void cinergyt2_query (void *data)
+#else
+static void cinergyt2_query (struct work_struct *work)
+#endif
{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
struct cinergyt2 *cinergyt2 = (struct cinergyt2 *) data;
+#else
+ struct cinergyt2 *cinergyt2 =
+ container_of(work, struct cinergyt2, query_work.work);
+#endif
char cmd [] = { CINERGYT2_EP1_GET_TUNER_STATUS };
struct dvbt_get_status_msg *s = &cinergyt2->status;
uint8_t lock_bits;
@@ -926,7 +956,11 @@ static int cinergyt2_probe (struct usb_interface *intf,
mutex_init(&cinergyt2->sem);
init_waitqueue_head (&cinergyt2->poll_wq);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
INIT_WORK(&cinergyt2->query_work, cinergyt2_query, cinergyt2);
+#else
+ INIT_DELAYED_WORK(&cinergyt2->query_work, cinergyt2_query);
+#endif
cinergyt2->udev = interface_to_usbdev(intf);
cinergyt2->param.cmd = CINERGYT2_EP1_SET_TUNER_PARAMETERS;
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
index 52008bc96..fc65d9a25 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -34,7 +34,12 @@
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/list.h>
+#include "compat.h"
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
#include <linux/suspend.h>
+#else
+#include <linux/freezer.h>
+#endif
#include <linux/jiffies.h>
#include <asm/processor.h>
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_net.c b/linux/drivers/media/dvb/dvb-core/dvb_net.c
index 884ce0402..3e94e6cf9 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_net.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_net.c
@@ -130,6 +130,9 @@ struct dvb_net_priv {
int in_use;
struct net_device_stats stats;
u16 pid;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
+ struct net_device *net;
+#endif
struct dvb_net *host;
struct dmx_demux *demux;
struct dmx_section_feed *secfeed;
@@ -1130,10 +1133,20 @@ static int dvb_set_mc_filter (struct net_device *dev, struct dev_mc_list *mc)
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
static void wq_set_multicast_list (void *data)
+#else
+static void wq_set_multicast_list (struct work_struct *work)
+#endif
{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
struct net_device *dev = data;
struct dvb_net_priv *priv = dev->priv;
+#else
+ struct dvb_net_priv *priv =
+ container_of(work, struct dvb_net_priv, set_multicast_list_wq);
+ struct net_device *dev = priv->net;
+#endif
dvb_net_feed_stop(dev);
priv->rx_mode = RX_MODE_UNI;
@@ -1182,9 +1195,19 @@ static void dvb_net_set_multicast_list (struct net_device *dev)
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
static void wq_restart_net_feed (void *data)
+#else
+static void wq_restart_net_feed (struct work_struct *work)
+#endif
{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
struct net_device *dev = data;
+#else
+ struct dvb_net_priv *priv =
+ container_of(work, struct dvb_net_priv, restart_net_feed_wq);
+ struct net_device *dev = priv->net;
+#endif
if (netif_running(dev)) {
dvb_net_feed_stop(dev);
@@ -1291,6 +1314,9 @@ static int dvb_net_add_if(struct dvb_net *dvbnet, u16 pid, u8 feedtype)
dvbnet->device[if_num] = net;
priv = net->priv;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
+ priv->net = net;
+#endif
priv->demux = dvbnet->demux;
priv->pid = pid;
priv->rx_mode = RX_MODE_UNI;
@@ -1299,8 +1325,13 @@ static int dvb_net_add_if(struct dvb_net *dvbnet, u16 pid, u8 feedtype)
priv->feedtype = feedtype;
reset_ule(priv);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
INIT_WORK(&priv->set_multicast_list_wq, wq_set_multicast_list, net);
INIT_WORK(&priv->restart_net_feed_wq, wq_restart_net_feed, net);
+#else
+ INIT_WORK(&priv->set_multicast_list_wq, wq_set_multicast_list);
+ INIT_WORK(&priv->restart_net_feed_wq, wq_restart_net_feed);
+#endif
mutex_init(&priv->mutex);
net->base_addr = pid;
diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c b/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
index 5fbb70c80..1a86adbfa 100644
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
@@ -19,9 +19,18 @@
*
* TODO: Fix the repeat rate of the input device.
*/
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
static void dvb_usb_read_remote_control(void *data)
+#else
+static void dvb_usb_read_remote_control(struct work_struct *work)
+#endif
{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
struct dvb_usb_device *d = data;
+#else
+ struct dvb_usb_device *d =
+ container_of(work, struct dvb_usb_device, rc_query_work.work);
+#endif
u32 event;
int state;
@@ -145,7 +154,11 @@ int dvb_usb_remote_init(struct dvb_usb_device *d)
d->rc_input_dev = input_dev;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
INIT_WORK(&d->rc_query_work, dvb_usb_read_remote_control, d);
+#else
+ INIT_DELAYED_WORK(&d->rc_query_work, dvb_usb_read_remote_control);
+#endif
info("schedule remote query interval to %d msecs.", d->props.rc_interval);
schedule_delayed_work(&d->rc_query_work,msecs_to_jiffies(d->props.rc_interval));
diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb.h b/linux/drivers/media/dvb/dvb-usb/dvb-usb.h
index 883496c00..6ec8e4510 100644
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb.h
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb.h
@@ -380,7 +380,11 @@ struct dvb_usb_device {
/* remote control */
struct input_dev *rc_input_dev;
char rc_phys[64];
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
struct work_struct rc_query_work;
+#else
+ struct delayed_work rc_query_work;
+#endif
u32 last_event;
int last_state;