summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/dvb-core
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-07-26 05:47:42 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-26 05:47:42 -0300
commitd1c3ce25c000fa72c7bfb3b42d88bfbe4f5e37fa (patch)
tree551d1ce9ed77fcb5b2763cd8f606b46a043de386 /linux/drivers/media/dvb/dvb-core
parent6324f3b71dfb070913efba2306010ae2e0a1df11 (diff)
parente768886b19cdc2ba666bd52faa7797ff4151ced7 (diff)
downloadmediapointer-dvb-s2-d1c3ce25c000fa72c7bfb3b42d88bfbe4f5e37fa.tar.gz
mediapointer-dvb-s2-d1c3ce25c000fa72c7bfb3b42d88bfbe4f5e37fa.tar.bz2
merge: http://linuxtv.org/hg/~mkrufky/sms1xxx
From: Mauro Carvalho Chehab <mchehab@infradead.org> 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_net.c8
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvbdev.c15
2 files changed, 23 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_net.c b/linux/drivers/media/dvb/dvb-core/dvb_net.c
index 3c0106f65..e0d60cdc4 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_net.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_net.c
@@ -1165,7 +1165,11 @@ static void wq_set_multicast_list (struct work_struct *work)
#ifdef OLD_XMIT_LOCK /* Kernels equal or lower than 2.6.17 */
spin_lock_bh(&dev->xmit_lock);
#else
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 26)
netif_tx_lock_bh(dev);
+#else
+ netif_addr_lock_bh(dev);
+#endif
#endif
if (dev->flags & IFF_PROMISC) {
@@ -1194,7 +1198,11 @@ static void wq_set_multicast_list (struct work_struct *work)
#ifdef OLD_XMIT_LOCK /* Kernels equal or lower than 2.6.17 */
spin_unlock_bh(&dev->xmit_lock);
#else
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 26)
netif_tx_unlock_bh(dev);
+#else
+ netif_addr_unlock_bh(dev);
+#endif
#endif
dvb_net_feed_start(dev);
}
diff --git a/linux/drivers/media/dvb/dvb-core/dvbdev.c b/linux/drivers/media/dvb/dvb-core/dvbdev.c
index 0ae0e5852..0820da504 100644
--- a/linux/drivers/media/dvb/dvb-core/dvbdev.c
+++ b/linux/drivers/media/dvb/dvb-core/dvbdev.c
@@ -33,6 +33,7 @@
#include <linux/cdev.h>
#include "compat.h"
#include <linux/mutex.h>
+#include <linux/smp_lock.h>
#include "dvbdev.h"
static int dvbdev_debug;
@@ -75,6 +76,7 @@ static int dvb_device_open(struct inode *inode, struct file *file)
{
struct dvb_device *dvbdev;
+ lock_kernel();
dvbdev = dvbdev_find_device (iminor(inode));
if (dvbdev && dvbdev->fops) {
@@ -95,8 +97,10 @@ static int dvb_device_open(struct inode *inode, struct file *file)
file->f_op = fops_get(old_fops);
}
fops_put(old_fops);
+ unlock_kernel();
return err;
}
+ unlock_kernel();
return -ENODEV;
}
@@ -238,9 +242,15 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
mutex_unlock(&dvbdev_register_lock);
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 26)
+ clsdev = device_create_drvdata(dvb_class, adap->device,
+ MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)),
+ NULL, "dvb%d.%s%d", adap->num, dnames[type], id);
+#else
clsdev = device_create(dvb_class, adap->device,
MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)),
"dvb%d.%s%d", adap->num, dnames[type], id);
+#endif
if (IS_ERR(clsdev)) {
printk(KERN_ERR "%s: failed to create device dvb%d.%s%d (%ld)\n",
__func__, adap->num, dnames[type], id, PTR_ERR(clsdev));
@@ -425,7 +435,12 @@ static int __init init_dvbdev(void)
return retval;
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17)
cdev_init(&dvb_device_cdev, &dvb_device_fops);
+#else
+ cdev_init(&dvb_device_cdev,
+ (struct file_operations *)&dvb_device_fops);
+#endif
if ((retval = cdev_add(&dvb_device_cdev, dev, MAX_DVB_MINORS)) != 0) {
printk(KERN_ERR "dvb-core: unable register character device\n");
goto error;