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>
此提交包含在:
Hans Verkuil
2008-07-21 02:57:38 -03:00
提交者 Mauro Carvalho Chehab
父節點 b654fcdc0e
當前提交 a399810ca6
共有 38 個檔案被更改,包括 980 行新增828 行删除

查看文件

@@ -570,12 +570,7 @@ static const struct file_operations cadet_fops = {
.llseek = no_llseek,
};
static struct video_device cadet_radio=
{
.owner = THIS_MODULE,
.name = "Cadet radio",
.type = VID_TYPE_TUNER,
.fops = &cadet_fops,
static const struct v4l2_ioctl_ops cadet_ioctl_ops = {
.vidioc_querycap = vidioc_querycap,
.vidioc_g_tuner = vidioc_g_tuner,
.vidioc_s_tuner = vidioc_s_tuner,
@@ -590,6 +585,14 @@ static struct video_device cadet_radio=
.vidioc_s_input = vidioc_s_input,
};
static struct video_device cadet_radio = {
.owner = THIS_MODULE,
.name = "Cadet radio",
.type = VID_TYPE_TUNER,
.fops = &cadet_fops,
.ioctl_ops = &cadet_ioctl_ops,
};
#ifdef CONFIG_PNP
static struct pnp_device_id cadet_pnp_devices[] = {