]> git.karo-electronics.de Git - mv-sheeva.git/commit
[media] v4l2-dev: use mutex_lock_interruptible instead of plain mutex_lock
authorHans Verkuil <hverkuil@xs4all.nl>
Fri, 26 Nov 2010 09:43:51 +0000 (06:43 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 1 Dec 2010 22:10:18 +0000 (20:10 -0200)
commit2877842de8cbf6272b0a851cb12587b7dd8c2afb
tree1f04f8d9a4873a5904e5a2f0278f3423cef0d2ca
parent78b055be2710b63cb196fc37669f3b662fecc9e4
[media] v4l2-dev: use mutex_lock_interruptible instead of plain mutex_lock

Where reasonable use mutex_lock_interruptible instead of mutex_lock.
Also fix the poll, read and write error codes when called with an unregistered
device (e.g. after a USB device was disconnected). Poll must return
POLLERR|POLLHUP and read/write must return -ENODEV.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/v4l2-dev.c