From 0edf2e5e2bd0ae7689ce8a57ae3c87cc1f0c6548 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Wed, 27 Oct 2010 09:30:32 -0300 Subject: [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 Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/cx231xx/cx231xx-417.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers/media/video/cx231xx') diff --git a/drivers/media/video/cx231xx/cx231xx-417.c b/drivers/media/video/cx231xx/cx231xx-417.c index aab21f3ce472..4c7cac3b6254 100644 --- a/drivers/media/video/cx231xx/cx231xx-417.c +++ b/drivers/media/video/cx231xx/cx231xx-417.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include @@ -1927,10 +1926,9 @@ static int mpeg_open(struct file *file) dev = h; } - if (dev == NULL) { - unlock_kernel(); + if (dev == NULL) return -ENODEV; - } + mutex_lock(&dev->lock); /* allocate + initialize per filehandle data */ -- cgit v1.2.3