summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/dvb-core
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/dvb/dvb-core')
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_frontend.c5
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_net.c31
2 files changed, 36 insertions, 0 deletions
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;