aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa5249.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/saa5249.c')
-rw-r--r--drivers/media/video/saa5249.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/media/video/saa5249.c b/drivers/media/video/saa5249.c
index 0d639738d4e6..96c0fdf1a051 100644
--- a/drivers/media/video/saa5249.c
+++ b/drivers/media/video/saa5249.c
@@ -52,6 +52,7 @@
52#include <linux/ioport.h> 52#include <linux/ioport.h>
53#include <linux/slab.h> 53#include <linux/slab.h>
54#include <linux/init.h> 54#include <linux/init.h>
55#include <linux/smp_lock.h>
55#include <stdarg.h> 56#include <stdarg.h>
56#include <linux/i2c.h> 57#include <linux/i2c.h>
57#include <linux/videotext.h> 58#include <linux/videotext.h>
@@ -633,9 +634,12 @@ static int saa5249_open(struct inode *inode, struct file *file)
633 struct saa5249_device *t=vd->priv; 634 struct saa5249_device *t=vd->priv;
634 int err,pgbuf; 635 int err,pgbuf;
635 636
637 lock_kernel();
636 err = video_exclusive_open(inode,file); 638 err = video_exclusive_open(inode,file);
637 if (err < 0) 639 if (err < 0) {
640 unlock_kernel();
638 return err; 641 return err;
642 }
639 643
640 if (t->client==NULL) { 644 if (t->client==NULL) {
641 err = -ENODEV; 645 err = -ENODEV;
@@ -664,10 +668,12 @@ static int saa5249_open(struct inode *inode, struct file *file)
664 t->is_searching[pgbuf] = false; 668 t->is_searching[pgbuf] = false;
665 } 669 }
666 t->virtual_mode = false; 670 t->virtual_mode = false;
671 unlock_kernel();
667 return 0; 672 return 0;
668 673
669 fail: 674 fail:
670 video_exclusive_release(inode,file); 675 video_exclusive_release(inode,file);
676 unlock_kernel();
671 return err; 677 return err;
672} 678}
673 679