summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-core/dvbdev.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-18 13:53:16 +0200
committerIngo Molnar <mingo@elte.hu>2008-07-18 13:53:16 +0200
commitcdbfc557c43ea1f1f9b7062300ecb1254969814b (patch)
tree255f1cf62cea2c3dec208799a00a116e714a6128 /drivers/media/dvb/dvb-core/dvbdev.c
parent4d8cc874d7ed43eda72765e9c0e141e170fee4f3 (diff)
parent5b664cb235e97afbf34db9c4d77f08ebd725335e (diff)
Merge branch 'linus' into x86/cleanups
Diffstat (limited to 'drivers/media/dvb/dvb-core/dvbdev.c')
-rw-r--r--drivers/media/dvb/dvb-core/dvbdev.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/dvb/dvb-core/dvbdev.c b/drivers/media/dvb/dvb-core/dvbdev.c
index 8b56d929f7f..e208a60c048 100644
--- a/drivers/media/dvb/dvb-core/dvbdev.c
+++ b/drivers/media/dvb/dvb-core/dvbdev.c
@@ -32,6 +32,7 @@
#include <linux/fs.h>
#include <linux/cdev.h>
#include <linux/mutex.h>
+#include <linux/smp_lock.h>
#include "dvbdev.h"
static int dvbdev_debug;
@@ -74,6 +75,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) {
@@ -90,8 +92,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;
}