aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/se401.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-11-15 13:54:00 +0900
committerPaul Mundt <lethal@linux-sh.org>2010-11-15 13:54:00 +0900
commit344ac148442e3223ac1b0e29ef3d3fb73c5ed61a (patch)
tree7b654a74727c57344296768c3a2d7d03b17f37ea /drivers/media/video/se401.c
parentMerge branches 'sh/rtc' and 'common/clkfwk' into sh/urgent (diff)
parentMerge branch 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6 (diff)
downloadlinux-dev-344ac148442e3223ac1b0e29ef3d3fb73c5ed61a.tar.xz
linux-dev-344ac148442e3223ac1b0e29ef3d3fb73c5ed61a.zip
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into sh/urgent
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";
#include <linux/init.h>
#include <linux/vmalloc.h>
#include <linux/slab.h>
-#include <linux/smp_lock.h>
#include <linux/pagemap.h>
#include <linux/usb.h>
#include "se401.h"
@@ -951,9 +950,9 @@ static int se401_open(struct file *file)
struct usb_se401 *se401 = (struct usb_se401 *)dev;
int err = 0;
- lock_kernel();
+ mutex_lock(&se401->lock);
if (se401->user) {
- unlock_kernel();
+ mutex_unlock(&se401->lock);
return -EBUSY;
}
se401->fbuf = rvmalloc(se401->maxframesize * SE401_NUMFRAMES);
@@ -962,7 +961,7 @@ static int se401_open(struct file *file)
else
err = -ENOMEM;
se401->user = !err;
- unlock_kernel();
+ mutex_unlock(&se401->lock);
return err;
}