diff options
Diffstat (limited to 'drivers/media/video/se401.c')
-rw-r--r-- | drivers/media/video/se401.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/media/video/se401.c b/drivers/media/video/se401.c index 41d0166c0f95..41360d7c3e96 100644 --- a/drivers/media/video/se401.c +++ b/drivers/media/video/se401.c | |||
@@ -31,7 +31,6 @@ static const char version[] = "0.24"; | |||
31 | #include <linux/init.h> | 31 | #include <linux/init.h> |
32 | #include <linux/vmalloc.h> | 32 | #include <linux/vmalloc.h> |
33 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
34 | #include <linux/smp_lock.h> | ||
35 | #include <linux/pagemap.h> | 34 | #include <linux/pagemap.h> |
36 | #include <linux/usb.h> | 35 | #include <linux/usb.h> |
37 | #include "se401.h" | 36 | #include "se401.h" |
@@ -951,9 +950,9 @@ static int se401_open(struct file *file) | |||
951 | struct usb_se401 *se401 = (struct usb_se401 *)dev; | 950 | struct usb_se401 *se401 = (struct usb_se401 *)dev; |
952 | int err = 0; | 951 | int err = 0; |
953 | 952 | ||
954 | lock_kernel(); | 953 | mutex_lock(&se401->lock); |
955 | if (se401->user) { | 954 | if (se401->user) { |
956 | unlock_kernel(); | 955 | mutex_unlock(&se401->lock); |
957 | return -EBUSY; | 956 | return -EBUSY; |
958 | } | 957 | } |
959 | se401->fbuf = rvmalloc(se401->maxframesize * SE401_NUMFRAMES); | 958 | se401->fbuf = rvmalloc(se401->maxframesize * SE401_NUMFRAMES); |
@@ -962,7 +961,7 @@ static int se401_open(struct file *file) | |||
962 | else | 961 | else |
963 | err = -ENOMEM; | 962 | err = -ENOMEM; |
964 | se401->user = !err; | 963 | se401->user = !err; |
965 | unlock_kernel(); | 964 | mutex_unlock(&se401->lock); |
966 | 965 | ||
967 | return err; | 966 | return err; |
968 | } | 967 | } |