V4L/DVB (8482): videodev: move all ioctl callbacks to a new v4l2_ioctl_ops struct
All ioctl callbacks are now stored in a new v4l2_ioctl_ops struct. Drivers fill in a const struct v4l2_ioctl_ops and video_device just contains a const pointer to it. This ensures a clean separation between the const ops struct and the non-const video_device struct. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:

committed by
Mauro Carvalho Chehab

parent
b654fcdc0e
commit
a399810ca6
@@ -445,14 +445,7 @@ static const struct file_operations usb_dsbr100_fops = {
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
/* V4L2 interface */
|
||||
static struct video_device dsbr100_videodev_template =
|
||||
{
|
||||
.owner = THIS_MODULE,
|
||||
.name = "D-Link DSB-R 100",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &usb_dsbr100_fops,
|
||||
.release = video_device_release,
|
||||
static const struct v4l2_ioctl_ops usb_dsbr100_ioctl_ops = {
|
||||
.vidioc_querycap = vidioc_querycap,
|
||||
.vidioc_g_tuner = vidioc_g_tuner,
|
||||
.vidioc_s_tuner = vidioc_s_tuner,
|
||||
@@ -467,6 +460,16 @@ static struct video_device dsbr100_videodev_template =
|
||||
.vidioc_s_input = vidioc_s_input,
|
||||
};
|
||||
|
||||
/* V4L2 interface */
|
||||
static struct video_device dsbr100_videodev_template = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "D-Link DSB-R 100",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &usb_dsbr100_fops,
|
||||
.ioctl_ops = &usb_dsbr100_ioctl_ops,
|
||||
.release = video_device_release,
|
||||
};
|
||||
|
||||
/* check if the device is present and register with v4l and
|
||||
usb if it is */
|
||||
static int usb_dsbr100_probe(struct usb_interface *intf,
|
||||
|
Reference in New Issue
Block a user