aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2010-09-26 07:16:56 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-20 23:06:14 -0400
commitd69f27186c16008540166c8017e9d4db2b477588 (patch)
tree5aad41d0b021e7544bf0aae30c44657e1afd3e45 /drivers
parent96322b80e29802d2d3087987f6dc4e5aa19df64b (diff)
V4L/DVB: v4l2-dev: after a disconnect any ioctl call will be blocked
Until now all fops except release and (unlocked_)ioctl returned an error after the device node was unregistered. Extend this as well to the ioctl fops. There is nothing useful that an application can do here and it complicates the driver code unnecessarily. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/v4l2-dev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c
index d4a353260c1..f069c61cdf6 100644
--- a/drivers/media/video/v4l2-dev.c
+++ b/drivers/media/video/v4l2-dev.c
@@ -221,8 +221,8 @@ static long v4l2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
221 struct video_device *vdev = video_devdata(filp); 221 struct video_device *vdev = video_devdata(filp);
222 int ret; 222 int ret;
223 223
224 /* Allow ioctl to continue even if the device was unregistered. 224 if (!vdev->fops->ioctl)
225 Things like dequeueing buffers might still be useful. */ 225 return -ENOTTY;
226 if (vdev->fops->unlocked_ioctl) { 226 if (vdev->fops->unlocked_ioctl) {
227 ret = vdev->fops->unlocked_ioctl(filp, cmd, arg); 227 ret = vdev->fops->unlocked_ioctl(filp, cmd, arg);
228 } else if (vdev->fops->ioctl) { 228 } else if (vdev->fops->ioctl) {