linux/drivers/media/video
Tejun Heo 5f820f648c poll: allow f_op->poll to sleep
f_op->poll is the only vfs operation which is not allowed to sleep.  It's
because poll and select implementation used task state to synchronize
against wake ups, which doesn't have to be the case anymore as wait/wake
interface can now use custom wake up functions.  The non-sleep restriction
can be a bit tricky because ->poll is not called from an atomic context
and the result of accidentally sleeping in ->poll only shows up as
temporary busy looping when the timing is right or rather wrong.

This patch converts poll/select to use custom wake up function and use
separate triggered variable to synchronize against wake up events.  The
only added overhead is an extra function call during wake up and
negligible.

This patch removes the one non-sleep exception from vfs locking rules and
is beneficial to userland filesystem implementations like FUSE, 9p or
peculiar fs like spufs as it's very difficult for those to implement
non-sleeping poll method.

While at it, make the following cosmetic changes to make poll.h and
select.c checkpatch friendly.

* s/type * symbol/type *symbol/		   : three places in poll.h
* remove blank line before EXPORT_SYMBOL() : two places in select.c

Oleg: spotted missing barrier in poll_schedule_timeout()
Davide: spotted missing write barrier in pollwake()

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Eric Van Hensbergen <ericvh@gmail.com>
Cc: Ron Minnich <rminnich@sandia.gov>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Cc: Davide Libenzi <davidel@xmailserver.org>
Cc: Brad Boyer <flar@allandria.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Roland McGrath <roland@redhat.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Davide Libenzi <davidel@xmailserver.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-06 15:59:12 -08:00
..
au0828
bt8xx V4L/DVB (10173): Missing v4l2_prio_close in radio_release 2009-01-03 10:50:38 -02:00
cpia2 V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
cx18 V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
cx88 V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
cx23885 V4L/DVB (10148): cx23885: unsigned cx23417_mailbox cannot be negative 2009-01-02 17:12:18 -02:00
cx25840 V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
em28xx V4L/DVB (10163): em28xx: allocate adev together with struct em28xx dev 2009-01-02 17:14:55 -02:00
et61x251 V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
gspca V4L/DVB (10135): v4l2: introduce v4l2_file_operations. 2009-01-02 17:11:12 -02:00
ivtv V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
ovcamchip
pvrusb2 V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
pwc V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
saa7134 V4L/DVB (10161): saa7134: fix autodetection for AVer TV GO 007 FM Plus 2009-01-02 17:14:34 -02:00
sn9c102 V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
usbvideo V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
usbvision V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
uvc V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
zc0301 V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
zoran V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
adv7170.c
adv7175.c
arv.c V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
bt819.c
bt856.c
bt866.c
btcx-risc.c
btcx-risc.h
bw-qcam.c V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
bw-qcam.h
c-qcam.c V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
cafe_ccic-regs.h
cafe_ccic.c V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
cpia_pp.c
cpia_usb.c
cpia.c V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
cpia.h
cs53l32a.c V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
cs5345.c V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
cs8420.h
cx2341x.c
dabusb.c
dabusb.h
font.h
hexium_gemini.c V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
hexium_orion.c V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
ibmmpeg2.h
indycam.c
indycam.h
ir-kbd-i2c.c
Kconfig V4L/DVB (10099): soc-camera: add support for MT9T031 CMOS camera sensor from Micron 2008-12-30 09:40:30 -02:00
ks0127.c
ks0127.h
m52790.c V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
Makefile V4L/DVB (10137): v4l2-compat32: only build if needed 2009-01-02 17:11:25 -02:00
meye.c V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
meye.h
msp3400-driver.c V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
msp3400-driver.h
msp3400-kthreads.c
mt9m001.c V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
mt9m111.c V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
mt9t031.c V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
mt9v022.c V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
mxb.c V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
mxb.h
omap24xxcam-dma.c
omap24xxcam.c V4L/DVB (10135): v4l2: introduce v4l2_file_operations. 2009-01-02 17:11:12 -02:00
omap24xxcam.h
ov511.c V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
ov511.h
ov772x.c V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
ov7670.c V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
pms.c V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
pxa_camera.c Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 2008-12-30 17:41:32 -08:00
pxa_camera.h
s2255drv.c V4L/DVB (10135): v4l2: introduce v4l2_file_operations. 2009-01-02 17:11:12 -02:00
saa711x_regs.h
saa717x.c V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
saa5246a.c V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
saa5249.c V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
saa6588.c
saa7110.c
saa7111.c
saa7114.c
saa7115.c V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
saa7121.h
saa7127.c V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
saa7146.h
saa7146reg.h
saa7185.c
saa7191.c
saa7191.h
se401.c V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
se401.h
sh_mobile_ceu_camera.c V4L/DVB (10092): Change V4L2 field to ANY from NONE on sh_mobile_ceu_camera.c 2008-12-30 09:40:27 -02:00
soc_camera_platform.c V4L/DVB (10080): soc-camera: readability improvements, more strict operations checks 2008-12-30 09:40:21 -02:00
soc_camera.c V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
stk-sensor.c
stk-webcam.c V4L/DVB (10135): v4l2: introduce v4l2_file_operations. 2009-01-02 17:11:12 -02:00
stk-webcam.h
stradis.c V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
stv680.c V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
stv680.h
tcm825x.c
tcm825x.h
tda7432.c
tda9840.c V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
tda9840.h
tda9875.c
tea6415c.c V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
tea6415c.h
tea6420.c V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
tea6420.h
tlv320aic23b.c
tuner-core.c V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
tvaudio.c V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
tveeprom.c
tvp514x_regs.h
tvp514x.c
tvp5150_reg.h
tvp5150.c V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
tw9910.c V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
upd64031a.c V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
upd64083.c V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
v4l1-compat.c poll: allow f_op->poll to sleep 2009-01-06 15:59:12 -08:00
v4l2-common.c V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
v4l2-compat-ioctl32.c V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
v4l2-dev.c V4L/DVB (10139): v4l: rename v4l_compat_ioctl32 to v4l2_compat_ioctl32 2009-01-02 17:11:39 -02:00
v4l2-device.c
v4l2-int-device.c
v4l2-ioctl.c V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
v4l2-subdev.c V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
videobuf-core.c
videobuf-dma-contig.c
videobuf-dma-sg.c
videobuf-dvb.c
videobuf-vmalloc.c
vino.c V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
vino.h
vivi.c V4L/DVB (10135): v4l2: introduce v4l2_file_operations. 2009-01-02 17:11:12 -02:00
vp27smpx.c V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
vpx3220.c
w9966.c V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
w9968cf_decoder.h
w9968cf_vpp.h
w9968cf.c V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
w9968cf.h
wm8739.c V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
wm8775.c V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
zr364xx.c V4L/DVB (10171): Use usb_set_intfdata 2009-01-03 10:50:26 -02:00