[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>
This commit is contained in:
Laurent Pinchart
2010-02-26 12:23:10 -03:00
committed by Mauro Carvalho Chehab
parent cfe2cde6d3
commit c30b46e58b
2 changed files with 6 additions and 1 deletions

View File

@@ -405,6 +405,11 @@ VIDIOC_UNSUBSCRIBE_EVENT
To properly support events, the poll() file operation is also To properly support events, the poll() file operation is also
implemented. 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 I2C sub-device drivers
---------------------- ----------------------

View File

@@ -276,7 +276,7 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg)
} }
#endif #endif
default: default:
return -ENOIOCTLCMD; return v4l2_subdev_call(sd, core, ioctl, cmd, arg);
} }
return 0; return 0;