[media] v4l: subdev: Generic ioctl support
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 26 Feb 2010 15:23:10 +0000 (12:23 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 22 Mar 2011 07:53:45 +0000 (04:53 -0300)
Instead of returning an error when receiving an ioctl call with an
unsupported command, forward the call to the subdev core::ioctl handler.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Documentation/video4linux/v4l2-framework.txt
drivers/media/video/v4l2-subdev.c

index 77d96f4e3f50aa395d2603fdd73468c8c896a3c8..f2df31b088c669c7a769a8b9be8985cb918c57c4 100644 (file)
@@ -405,6 +405,11 @@ VIDIOC_UNSUBSCRIBE_EVENT
        To properly support events, the poll() file operation is also
        implemented.
 
+Private ioctls
+
+       All ioctls not in the above list are passed directly to the sub-device
+       driver through the core::ioctl operation.
+
 
 I2C sub-device drivers
 ----------------------
index 6e76f734c7807fad1f94c83b1ccad999d47c493a..0b80644906769e698c3c3f7195be6fc3b2941c42 100644 (file)
@@ -276,7 +276,7 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg)
        }
 #endif
        default:
-               return -ENOIOCTLCMD;
+               return v4l2_subdev_call(sd, core, ioctl, cmd, arg);
        }
 
        return 0;