aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/se401.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-11-19 03:04:25 -0500
committerPaul Mundt <lethal@linux-sh.org>2010-11-19 03:04:25 -0500
commitfe040be2fdc49a4132c5f64359c629aeeb8e4947 (patch)
tree40323a8f05d3754372f561bb8f4698ef1a4e9c8f /drivers/media/video/se401.c
parent2006920a18cc9f499e5cccf9e6f1aa9f6120705e (diff)
parent6722a4016d7f5f107a82ad71a3ee1ccec105532f (diff)
Merge branch 'common/fbdev-mipi' of master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6
Diffstat (limited to 'drivers/media/video/se401.c')
-rw-r--r--drivers/media/video/se401.c7
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}