summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2010-02-26 12:23:10 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-22 04:53:45 -0300
commitc30b46e58b31a0fc420049e21117444862fc7cb7 (patch)
tree684db5e6880fa8df24df1893be2478c0d455fe27
parentcfe2cde6d33f15994ad34466ac4a08f5bb348948 (diff)
downloadlinux-stable-c30b46e58b31a0fc420049e21117444862fc7cb7.tar.gz
linux-stable-c30b46e58b31a0fc420049e21117444862fc7cb7.tar.bz2
linux-stable-c30b46e58b31a0fc420049e21117444862fc7cb7.zip
[media] v4l: subdev: Generic ioctl support
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>
-rw-r--r--Documentation/video4linux/v4l2-framework.txt5
-rw-r--r--drivers/media/video/v4l2-subdev.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
index 77d96f4e3f50..f2df31b088c6 100644
--- a/Documentation/video4linux/v4l2-framework.txt
+++ b/Documentation/video4linux/v4l2-framework.txt
@@ -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
----------------------
diff --git a/drivers/media/video/v4l2-subdev.c b/drivers/media/video/v4l2-subdev.c
index 6e76f734c780..0b8064490676 100644
--- a/drivers/media/video/v4l2-subdev.c
+++ b/drivers/media/video/v4l2-subdev.c
@@ -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;