summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/dvb-core
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-12-16 18:29:03 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-12-16 18:29:03 -0200
commit44588fb487e94e330e9ea9da744cb35e7f14dc96 (patch)
treed1bcfa03e7ac8c5d1d327aca0023f43ed3f76651 /linux/drivers/media/dvb/dvb-core
parent35098755c90373eb932f02f71ec986e9d4a6f49b (diff)
downloadmediapointer-dvb-s2-44588fb487e94e330e9ea9da744cb35e7f14dc96.tar.gz
mediapointer-dvb-s2-44588fb487e94e330e9ea9da744cb35e7f14dc96.tar.bz2
Several stuff backported from 2.6.19-git series
From: Mauro Carvalho Chehab <mchehab@infradead.org> - INIT_WORK replaced by INIT_DELAYED_WORK - struct work_struct replaced by struct delayed_work - callback parameters also changed - SLAB_KERNEL replaced by GFP_KERNEL - linux/suspend.h replaced by linux/freezer.h - on cpia: INIT_WORK replaced by INIT_WORK_NAR - file->f_dentry->d_inode replaced by file->f_path.dentry->d_inode Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
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;