]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (9906): v4l2-compat: test for unlocked_ioctl as well.
authorHans Verkuil <hverkuil@xs4all.nl>
Tue, 16 Dec 2008 11:32:37 +0000 (08:32 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 16 Dec 2008 18:43:59 +0000 (16:43 -0200)
The v4l_compat_ioctl32() function only tested for the presence of the
ioctl op, not for unlocked_ioctl. So it would always return an error
when used with drivers that use unlocked_ioctl instead of ioctl.

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

index e6ca4012b5f0f78fab90212e546aa1b6f0cd4946..0ea85a05e5c0d86911d9a62fe3445e472cf1e877 100644 (file)
@@ -831,7 +831,7 @@ long v4l_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg)
 {
        int ret = -ENOIOCTLCMD;
 
-       if (!file->f_op->ioctl)
+       if (!file->f_op->ioctl && !file->f_op->unlocked_ioctl)
                return ret;
 
        switch (cmd) {