mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-12 00:00:00 +00:00
V4L/DVB (8731): zr364xx: remove BKL
Remove the Big Kernel Lock from zr364xx driver after pushdown. Now using an internal locking mecanism on open(). Signed-off-by: Antoine Jacquet <royale@zerezo.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
06fcadbf8b
commit
69025c934b
@ -641,25 +641,23 @@ static int zr364xx_open(struct inode *inode, struct file *file)
|
|||||||
|
|
||||||
DBG("zr364xx_open");
|
DBG("zr364xx_open");
|
||||||
|
|
||||||
|
mutex_lock(&cam->lock);
|
||||||
|
|
||||||
cam->skip = 2;
|
cam->skip = 2;
|
||||||
|
|
||||||
lock_kernel();
|
|
||||||
err = video_exclusive_open(inode, file);
|
err = video_exclusive_open(inode, file);
|
||||||
if (err < 0) {
|
if (err < 0)
|
||||||
unlock_kernel();
|
goto out;
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!cam->framebuf) {
|
if (!cam->framebuf) {
|
||||||
cam->framebuf = vmalloc_32(MAX_FRAME_SIZE * FRAMES);
|
cam->framebuf = vmalloc_32(MAX_FRAME_SIZE * FRAMES);
|
||||||
if (!cam->framebuf) {
|
if (!cam->framebuf) {
|
||||||
info("vmalloc_32 failed!");
|
info("vmalloc_32 failed!");
|
||||||
unlock_kernel();
|
err = -ENOMEM;
|
||||||
return -ENOMEM;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mutex_lock(&cam->lock);
|
|
||||||
for (i = 0; init[cam->method][i].size != -1; i++) {
|
for (i = 0; init[cam->method][i].size != -1; i++) {
|
||||||
err =
|
err =
|
||||||
send_control_msg(udev, 1, init[cam->method][i].value,
|
send_control_msg(udev, 1, init[cam->method][i].value,
|
||||||
@ -667,9 +665,7 @@ static int zr364xx_open(struct inode *inode, struct file *file)
|
|||||||
init[cam->method][i].size);
|
init[cam->method][i].size);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
info("error during open sequence: %d", i);
|
info("error during open sequence: %d", i);
|
||||||
mutex_unlock(&cam->lock);
|
goto out;
|
||||||
unlock_kernel();
|
|
||||||
return err;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -679,10 +675,11 @@ static int zr364xx_open(struct inode *inode, struct file *file)
|
|||||||
* like Ekiga does during its startup, can crash the webcam
|
* like Ekiga does during its startup, can crash the webcam
|
||||||
*/
|
*/
|
||||||
mdelay(100);
|
mdelay(100);
|
||||||
|
err = 0;
|
||||||
|
|
||||||
|
out:
|
||||||
mutex_unlock(&cam->lock);
|
mutex_unlock(&cam->lock);
|
||||||
unlock_kernel();
|
return err;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user