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/tlg2300/pd-main.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'drivers/media/video/tlg2300') diff --git a/drivers/media/video/tlg2300/pd-main.c b/drivers/media/video/tlg2300/pd-main.c index 4555f4a5f4c8..c91424c0c135 100644 --- a/drivers/media/video/tlg2300/pd-main.c +++ b/drivers/media/video/tlg2300/pd-main.c @@ -36,7 +36,6 @@ #include #include #include -#include #include "vendorcmds.h" #include "pd-common.h" @@ -485,15 +484,11 @@ static void poseidon_disconnect(struct usb_interface *interface) /*unregister v4l2 device */ v4l2_device_unregister(&pd->v4l2_dev); - lock_kernel(); - { - pd_dvb_usb_device_exit(pd); - poseidon_fm_exit(pd); + pd_dvb_usb_device_exit(pd); + poseidon_fm_exit(pd); - poseidon_audio_free(pd); - pd_video_exit(pd); - } - unlock_kernel(); + poseidon_audio_free(pd); + pd_video_exit(pd); usb_set_intfdata(interface, NULL); kref_put(&pd->kref, poseidon_delete); -- cgit v1.2.3