Skip to content

Commit

Permalink
[media] v4l: subdev: Generic ioctl support
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Laurent Pinchart authored and Mauro Carvalho Chehab committed Mar 22, 2011
1 parent cfe2cde commit c30b46e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Documentation/video4linux/v4l2-framework.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
----------------------
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/video/v4l2-subdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c30b46e

Please sign in to comment.