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>
此提交包含在:
@@ -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[] = {
|
||||
|
新增問題並參考
封鎖使用者