diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-10-27 16:30:32 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-11-09 03:35:57 +0300 |
commit | 0edf2e5e2bd0ae7689ce8a57ae3c87cc1f0c6548 (patch) | |
tree | 3a7cfbea0c456f44b79db2985d8e6e7085fa4152 /drivers/media/video/cx23885/cx23885-417.c | |
parent | 2c2742da1e590f426e8d85ce4e33b69142245fb8 (diff) | |
download | linux-0edf2e5e2bd0ae7689ce8a57ae3c87cc1f0c6548.tar.xz |
[media] v4l: kill the BKL
All of the hard problems for BKL removal appear to be solved in the
v4l-dvb/master tree. This removes the BKL from the various open
functions that do not need it, or only use it to protect an
open count.
The zoran driver is nontrivial in this regard, so I introduce
a new mutex that locks both the open/release and the ioctl
functions. Someone with access to the hardware can probably
improve that by using the existing lock in all cases.
Finally, all drivers that still use the locked version of the
ioctl function now get called under a new mutex instead of
the BKL.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx23885/cx23885-417.c')
-rw-r--r-- | drivers/media/video/cx23885/cx23885-417.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/media/video/cx23885/cx23885-417.c b/drivers/media/video/cx23885/cx23885-417.c index a6cc12f8736c..9a98dc55f657 100644 --- a/drivers/media/video/cx23885/cx23885-417.c +++ b/drivers/media/video/cx23885/cx23885-417.c @@ -31,7 +31,6 @@ #include <linux/delay.h> #include <linux/device.h> #include <linux/firmware.h> -#include <linux/smp_lock.h> #include <linux/slab.h> #include <media/v4l2-common.h> #include <media/v4l2-ioctl.h> @@ -1576,12 +1575,8 @@ static int mpeg_open(struct file *file) /* allocate + initialize per filehandle data */ fh = kzalloc(sizeof(*fh), GFP_KERNEL); - if (NULL == fh) { - unlock_kernel(); + if (!fh) return -ENOMEM; - } - - lock_kernel(); file->private_data = fh; fh->dev = dev; @@ -1592,8 +1587,6 @@ static int mpeg_open(struct file *file) V4L2_FIELD_INTERLACED, sizeof(struct cx23885_buffer), fh, NULL); - unlock_kernel(); - return 0; } |