kernel-ark/drivers/media/video
Sascha Sommer 5a80415bca V4L/DVB (6538): em28xx: fix locking to allow accesses from 2 different threads at the same time
The attached patch modifies the em28xx driver so that there can be ioctls from
multiple different threads.

This is necessary for capture apps like MPlayer that use different threads for
capturing and channel tuning.

Now the locking is only done for the ioctls that change properties of the
device or access the i2c bus.

It also removes some locks that look unnecessary:

In em28xx_init_dev:
  the videodevice is not registered yet so nothing can access the hardware
 meanwhile, the device struct is not assigned to the interface yet so no race
 with disconnect is possible

In em28xx_release_resources:
  it gets only called when dev->lock is already held

Signed-off-by: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:01:55 -02:00
..
bt8xx V4L/DVB (6507): bttv: whitespace cleanup 2008-01-25 19:01:53 -02:00
cpia2 V4L/DVB (6320): v4l core: remove the unused .hardware V4L1 field 2007-10-22 12:01:24 -02:00
cx88 V4L/DVB (6386): Add support for radio on CX88_BOARD_MSI_TVANYWHERE_MASTER 2008-01-25 19:00:55 -02:00
cx23885 V4L/DVB (6404): cx23885: i2c 16bit reg/val read/write fix 2008-01-25 19:00:56 -02:00
cx25840 V4L/DVB (6465): Use correct error codes when chip is not recognized 2008-01-25 19:01:27 -02:00
em28xx V4L/DVB (6538): em28xx: fix locking to allow accesses from 2 different threads at the same time 2008-01-25 19:01:55 -02:00
et61x251 V4L/DVB (6320): v4l core: remove the unused .hardware V4L1 field 2007-10-22 12:01:24 -02:00
ivtv V4L/DVB (6489): ivtv: add support for AVerMedia PVR-150 Plus 2008-01-25 19:01:50 -02:00
ovcamchip V4L/DVB (6079): Cleanup: remove linux/moduleparam.h from drivers/media files 2007-10-09 22:06:17 -03:00
pvrusb2 V4L/DVB (6548): pvrusb2: Fix oops on module removal 2007-11-04 21:41:30 -02:00
pwc V4L/DVB (6320): v4l core: remove the unused .hardware V4L1 field 2007-10-22 12:01:24 -02:00
saa7134 V4L/DVB (6399): saa7134/: make 2 functions static 2008-01-25 19:00:55 -02:00
sn9c102 V4L/DVB (6320): v4l core: remove the unused .hardware V4L1 field 2007-10-22 12:01:24 -02:00
usbvideo V4L/DVB (6320): v4l core: remove the unused .hardware V4L1 field 2007-10-22 12:01:24 -02:00
usbvision V4L/DVB (6400): usbvision: Convert the usbvision->lock semaphore to the mutex API 2008-01-25 19:00:55 -02:00
zc0301 V4L/DVB (6320): v4l core: remove the unused .hardware V4L1 field 2007-10-22 12:01:24 -02:00
adv7170.c V4L/DVB (5819): Cleanup: reorder some includes 2007-07-18 14:24:35 -03:00
adv7175.c V4L/DVB (5819): Cleanup: reorder some includes 2007-07-18 14:24:35 -03:00
arv.c V4L/DVB (6320): v4l core: remove the unused .hardware V4L1 field 2007-10-22 12:01:24 -02:00
bt819.c V4L/DVB (5819): Cleanup: reorder some includes 2007-07-18 14:24:35 -03:00
bt856.c V4L/DVB (5819): Cleanup: reorder some includes 2007-07-18 14:24:35 -03:00
bt866.c V4L/DVB (6819): i2c: fix drivers/media/video/bt866.c 2007-12-13 17:58:05 -02:00
btcx-risc.c V4L/DVB (6079): Cleanup: remove linux/moduleparam.h from drivers/media files 2007-10-09 22:06:17 -03:00
btcx-risc.h
bw-qcam.c V4L/DVB (6320): v4l core: remove the unused .hardware V4L1 field 2007-10-22 12:01:24 -02:00
bw-qcam.h
c-qcam.c V4L/DVB (6320): v4l core: remove the unused .hardware V4L1 field 2007-10-22 12:01:24 -02:00
cafe_ccic-regs.h V4L/DVB (5690): Cafe_ccic: Properly power down the sensor 2007-05-22 16:16:27 -03:00
cafe_ccic.c V4L/DVB (6395): cafe_ccic: Add a pointer to the data sheet 2007-11-04 21:41:18 -02:00
compat_ioctl32.c V4L/DVB (5989): V4L: Add additional ioctls to compat_ioctl32 2007-10-09 22:04:45 -03:00
cpia_pp.c
cpia_usb.c
cpia.c V4L/DVB (6320): v4l core: remove the unused .hardware V4L1 field 2007-10-22 12:01:24 -02:00
cpia.h
cs53l32a.c V4L/DVB (6465): Use correct error codes when chip is not recognized 2008-01-25 19:01:27 -02:00
cs8420.h
cx2341x.c V4L/DVB (6088): cx2341x: some controls can't be changed while the device is busy 2007-10-09 22:06:42 -03:00
dabfirmware.h
dabusb.c
dabusb.h
dpc7146.c V4L/DVB (6316): Change list_for_each+list_entry to list_for_each_entry 2007-10-10 13:35:29 -03:00
font.h
hexium_gemini.c
hexium_orion.c
ibmmpeg2.h
indycam.c
indycam.h
ir-kbd-i2c.c V4L/DVB (6352): ir-kbd-i2c: Missing break statement 2007-10-22 12:01:50 -02:00
Kconfig V4L/DVB (6490): Remove EXPERIMENTAL from several i2c drivers 2008-01-25 19:01:51 -02:00
ks0127.c
ks0127.h
m52790.c V4L/DVB (6486): m52790: add new Mitsubishi A/V switch i2c driver 2008-01-25 19:01:46 -02:00
Makefile V4L/DVB (6486): m52790: add new Mitsubishi A/V switch i2c driver 2008-01-25 19:01:46 -02:00
meye.c V4L/DVB (6320): v4l core: remove the unused .hardware V4L1 field 2007-10-22 12:01:24 -02:00
meye.h Convert files to UTF-8 and some cleanups 2007-10-19 23:21:04 +02:00
msp3400-driver.c V4L/DVB (6465): Use correct error codes when chip is not recognized 2008-01-25 19:01:27 -02:00
msp3400-driver.h
msp3400-kthreads.c Freezer: make kernel threads nonfreezable by default 2007-07-17 10:23:02 -07:00
mt20xx.c V4L/DVB (6130): mt20xx: convert from tuner sub-driver into dvb_frontend module 2007-10-09 22:07:39 -03:00
mt20xx.h V4L/DVB (6134): tuner: alter build to produce separate modules 2007-10-09 22:07:43 -03:00
mxb.c V4L/DVB (6316): Change list_for_each+list_entry to list_for_each_entry 2007-10-10 13:35:29 -03:00
mxb.h
ov511.c V4L/DVB (6320): v4l core: remove the unused .hardware V4L1 field 2007-10-22 12:01:24 -02:00
ov511.h
ov7670.c V4L/DVB (6079): Cleanup: remove linux/moduleparam.h from drivers/media files 2007-10-09 22:06:17 -03:00
planb.c V4L/DVB (6407): planb: fix obvious interrupt handling bugs 2007-11-04 21:41:20 -02:00
planb.h
pms.c V4L/DVB (6320): v4l core: remove the unused .hardware V4L1 field 2007-10-22 12:01:24 -02:00
saa711x_regs.h
saa711x.c
saa5246a.c V4L/DVB (6684): Complement va_start() with va_end() + style fixes 2007-12-11 18:08:16 -02:00
saa5246a.h
saa5249.c V4L/DVB (6684): Complement va_start() with va_end() + style fixes 2007-12-11 18:08:16 -02:00
saa6588.c V4L/DVB (6215): Bugfix for saa6588.c, add forgotten spin_lock_init() 2007-10-09 22:14:35 -03:00
saa7110.c V4L/DVB (5858): Use msecs_to_jiffies instead of HZ on media/video I2C drivers 2007-07-20 17:35:49 -03:00
saa7111.c V4L/DVB (5819): Cleanup: reorder some includes 2007-07-18 14:24:35 -03:00
saa7114.c V4L/DVB (5819): Cleanup: reorder some includes 2007-07-18 14:24:35 -03:00
saa7115.c V4L/DVB (6465): Use correct error codes when chip is not recognized 2008-01-25 19:01:27 -02:00
saa7121.h
saa7127.c V4L/DVB (6465): Use correct error codes when chip is not recognized 2008-01-25 19:01:27 -02:00
saa7146.h
saa7146reg.h
saa7185.c V4L/DVB (5819): Cleanup: reorder some includes 2007-07-18 14:24:35 -03:00
saa7191.c V4L/DVB (6148): Fix a warning at saa7191_probe 2007-09-14 13:13:42 -03:00
saa7191.h
saa7196.h
se401.c V4L/DVB (6320): v4l core: remove the unused .hardware V4L1 field 2007-10-22 12:01:24 -02:00
se401.h
stradis.c V4L/DVB (6320): v4l core: remove the unused .hardware V4L1 field 2007-10-22 12:01:24 -02:00
stv680.c V4L/DVB (6320): v4l core: remove the unused .hardware V4L1 field 2007-10-22 12:01:24 -02:00
stv680.h
tcm825x.c V4L/DVB (6220): TCM825x: Add support for vidioc_int_g_ifparm call, small cleanups 2007-10-09 22:14:40 -03:00
tcm825x.h V4L/DVB (6220): TCM825x: Add support for vidioc_int_g_ifparm call, small cleanups 2007-10-09 22:14:40 -03:00
tda7432.c V4L/DVB (6419): V4L2 port of tda7432 from V4L1 api 2008-01-25 19:01:00 -02:00
tda8290.c V4L/DVB (6471): tuner: i2c_client cannot be part of the tuner struct 2008-01-25 19:01:32 -02:00
tda8290.h V4L/DVB (6468): tda8290: auto-detect tda8290 or tda8295 2008-01-25 19:01:30 -02:00
tda9840.c
tda9840.h
tda9875.c V4L/DVB (6420): V4L2 conversion for tda9875 from V4L1 API 2008-01-25 19:01:00 -02:00
tda9887.c V4L/DVB (6471): tuner: i2c_client cannot be part of the tuner struct 2008-01-25 19:01:32 -02:00
tda9887.h V4L/DVB (6443): make tda9887 build selectable via Kconfig 2008-01-25 19:01:10 -02:00
tea5761.c V4L/DVB (6138): tea5761: add get_rf_strength and improve status reading efficiency 2007-10-09 22:07:46 -03:00
tea5761.h V4L/DVB (6134): tuner: alter build to produce separate modules 2007-10-09 22:07:43 -03:00
tea5767.c V4L/DVB (6385): Adds the capability of configuring tea5767 support 2008-01-25 19:00:54 -02:00
tea5767.h V4L/DVB (6385): Adds the capability of configuring tea5767 support 2008-01-25 19:00:54 -02:00
tea6415c.c
tea6415c.h
tea6420.c
tea6420.h
tlv320aic23b.c V4L/DVB (6465): Use correct error codes when chip is not recognized 2008-01-25 19:01:27 -02:00
tuner-3036.c
tuner-core.c V4L/DVB (6492): tuner: improve tuner_foo printk macros consistency 2008-01-25 19:01:51 -02:00
tuner-driver.h V4L/DVB (6492): tuner: improve tuner_foo printk macros consistency 2008-01-25 19:01:51 -02:00
tuner-i2c.h V4L/DVB (6127): tuner: kill i2c_client interface to tuner sub-drivers 2007-10-09 22:07:34 -03:00
tuner-simple.c V4L/DVB (6384): Replace TDA9887_SET_CONFIG by TUNER_SET_CONFIG 2008-01-25 19:00:54 -02:00
tuner-simple.h V4L/DVB (6134): tuner: alter build to produce separate modules 2007-10-09 22:07:43 -03:00
tuner-types.c V4L/DVB (6469): tuner: remove TUNER_PHILIPS_TDA8295 2008-01-25 19:01:30 -02:00
tuner-xc2028-types.h V4L/DVB (6431): Improve firmware format 2008-01-25 19:01:05 -02:00
tuner-xc2028.c V4L/DVB (6517): CodingStyle fixup 2008-01-25 19:01:54 -02:00
tuner-xc2028.h V4L/DVB (6517): CodingStyle fixup 2008-01-25 19:01:54 -02:00
tvaudio.c V4L/DVB (6461): tvaudio: convert to bus-based I2C API 2008-01-25 19:01:24 -02:00
tveeprom.c V4L/DVB (6469): tuner: remove TUNER_PHILIPS_TDA8295 2008-01-25 19:01:30 -02:00
tvmixer.c V4L/DVB (6316): Change list_for_each+list_entry to list_for_each_entry 2007-10-10 13:35:29 -03:00
tvp5150_reg.h
tvp5150.c V4L/DVB (6542): Fix S-video mode on tvp5150 2007-12-11 18:08:03 -02:00
upd64031a.c V4L/DVB (6465): Use correct error codes when chip is not recognized 2008-01-25 19:01:27 -02:00
upd64083.c V4L/DVB (6465): Use correct error codes when chip is not recognized 2008-01-25 19:01:27 -02:00
v4l1-compat.c Replace __attribute_pure__ with __pure 2007-10-18 14:37:32 -07:00
v4l2-common.c V4L/DVB (6467): v4l2-common: minor cleanups 2008-01-25 19:01:29 -02:00
v4l2-int-device.c V4L/DVB (6316): Change list_for_each+list_entry to list_for_each_entry 2007-10-10 13:35:29 -03:00
videobuf-core.c V4L/DVB (6803): buf-core.c locking fixes 2007-12-13 00:15:25 -02:00
videobuf-dma-sg.c SG: Change sg_set_page() to take length and offset argument 2007-10-24 11:20:47 +02:00
videobuf-dvb.c V4L/DVB (6257): Rename video-buf-dvb to videobuf-dvb to be consistent with the other patches 2007-10-10 00:02:46 -03:00
videobuf-vmalloc.c V4L/DVB (6751): V4L: Memory leak! Fix count in videobuf-vmalloc mmap 2007-12-11 18:08:22 -02:00
videocodec.c V4L/DVB (6320): v4l core: remove the unused .hardware V4L1 field 2007-10-22 12:01:24 -02:00
videocodec.h
videodev.c V4L/DVB (6321): Remove obsolete VIDIOC_S/G_MPEGCOMP ioctls 2007-10-22 12:01:30 -02:00
vino.c V4L/DVB (6079): Cleanup: remove linux/moduleparam.h from drivers/media files 2007-10-09 22:06:17 -03:00
vino.h
vivi.c V4L/DVB (6602): V4L: Convert videobuf drivers to videobuf_stop 2007-12-11 18:08:09 -02:00
vp27smpx.c V4L/DVB (6465): Use correct error codes when chip is not recognized 2008-01-25 19:01:27 -02:00
vpx3220.c
w9966.c V4L/DVB (6320): v4l core: remove the unused .hardware V4L1 field 2007-10-22 12:01:24 -02:00
w9968cf_decoder.h
w9968cf_vpp.h
w9968cf.c V4L/DVB (6320): v4l core: remove the unused .hardware V4L1 field 2007-10-22 12:01:24 -02:00
w9968cf.h
wm8739.c V4L/DVB (6465): Use correct error codes when chip is not recognized 2008-01-25 19:01:27 -02:00
wm8775.c V4L/DVB (6452): wm8775: convert to bus-based I2C API 2008-01-25 19:01:18 -02:00
zoran_card.c V4L/DVB (6320): v4l core: remove the unused .hardware V4L1 field 2007-10-22 12:01:24 -02:00
zoran_card.h V4L/DVB (5884): zr36067: clean up debug function 2007-10-09 22:02:57 -03:00
zoran_device.c V4L/DVB (5885): zr36067: Fix problems with module parameters 2007-10-09 22:02:58 -03:00
zoran_device.h
zoran_driver.c V4L/DVB (6320): v4l core: remove the unused .hardware V4L1 field 2007-10-22 12:01:24 -02:00
zoran_procfs.c V4L/DVB (5884): zr36067: clean up debug function 2007-10-09 22:02:57 -03:00
zoran_procfs.h
zoran.h V4L/DVB (5890): zr36067: Add UYVY, RGB555X, RGB565X, and RGB32 formats 2007-07-30 16:26:26 -03:00
zr364xx.c V4L/DVB (6482): zr364: make file_operations const 2008-01-25 19:01:44 -02:00
zr36016.c V4L/DVB (6078): Coding style fix drivers/media/video/zr36016.c 2007-10-09 22:06:07 -03:00
zr36016.h
zr36050.c V4L/DVB (6077): Coding style fix drivers/media/video/zr36050.c 2007-10-09 22:06:06 -03:00
zr36050.h
zr36057.h
zr36060.c V4L/DVB (6076): Coding style fix drivers/media/video/zr36060.c 2007-10-09 22:06:05 -03:00
zr36060.h