diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-20 08:31:29 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-20 08:31:29 -0300 |
commit | e8a23e1bfafeb7752ae02907ef694c3389757a16 (patch) | |
tree | 289e0fa56f8d18180d283184d8f013157343c639 /linux/drivers/media/video/videodev.c | |
parent | 31850509c7d6893733ef50bb76047fb38cf42cc2 (diff) | |
parent | d0baed8b7fb1bb59c7ddba31d4b0bab930d050de (diff) | |
download | mediapointer-dvb-s2-e8a23e1bfafeb7752ae02907ef694c3389757a16.tar.gz mediapointer-dvb-s2-e8a23e1bfafeb7752ae02907ef694c3389757a16.tar.bz2 |
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/videodev.c')
-rw-r--r-- | linux/drivers/media/video/videodev.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/linux/drivers/media/video/videodev.c b/linux/drivers/media/video/videodev.c index b32b59afd..48e03618a 100644 --- a/linux/drivers/media/video/videodev.c +++ b/linux/drivers/media/video/videodev.c @@ -40,6 +40,7 @@ #include <linux/init.h> #include <linux/kmod.h> #include <linux/slab.h> +#include <linux/smp_lock.h> #include <asm/uaccess.h> #include <asm/system.h> @@ -492,6 +493,7 @@ static int video_open(struct inode *inode, struct file *file) if(minor>=VIDEO_NUM_DEVICES) return -ENODEV; + lock_kernel(); mutex_lock(&videodev_lock); vfl=video_device[minor]; if(vfl==NULL) { @@ -501,6 +503,7 @@ static int video_open(struct inode *inode, struct file *file) vfl=video_device[minor]; if (vfl==NULL) { mutex_unlock(&videodev_lock); + unlock_kernel(); return -ENODEV; } } @@ -518,6 +521,7 @@ static int video_open(struct inode *inode, struct file *file) } fops_put(old_fops); mutex_unlock(&videodev_lock); + unlock_kernel(); return err; } |