From af41aa918f47e0bc59c5554cabbd05db0917bed4 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 21 Jul 2008 07:57:38 +0200 Subject: videodev: move all ioctl callbacks to a new v4l2_ioctl_ops struct From: Hans Verkuil 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 --- linux/drivers/media/radio/radio-aztech.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'linux/drivers/media/radio/radio-aztech.c') diff --git a/linux/drivers/media/radio/radio-aztech.c b/linux/drivers/media/radio/radio-aztech.c index 124df79a0..5711f7e96 100644 --- a/linux/drivers/media/radio/radio-aztech.c +++ b/linux/drivers/media/radio/radio-aztech.c @@ -354,12 +354,7 @@ static const struct file_operations aztech_fops = { .llseek = no_llseek, }; -static struct video_device aztech_radio= -{ - .owner = THIS_MODULE, - .name = "Aztech radio", - .type = VID_TYPE_TUNER, - .fops = &aztech_fops, +static const struct v4l2_ioctl_ops aztech_ioctl_ops = { .vidioc_querycap = vidioc_querycap, .vidioc_g_tuner = vidioc_g_tuner, .vidioc_s_tuner = vidioc_s_tuner, @@ -374,6 +369,14 @@ static struct video_device aztech_radio= .vidioc_s_ctrl = vidioc_s_ctrl, }; +static struct video_device aztech_radio = { + .owner = THIS_MODULE, + .name = "Aztech radio", + .type = VID_TYPE_TUNER, + .fops = &aztech_fops, + .ioctl_ops = &aztech_ioctl_ops, +}; + module_param_named(debug,aztech_radio.debug, int, 0644); MODULE_PARM_DESC(debug,"activates debug info"); -- cgit v1.2.3 From b0a3353c78a940cd8bea78e789a5e7b2c69788c7 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 21 Jul 2008 12:51:45 +0200 Subject: Remove obsolete owner field from video_device struct. From: Hans Verkuil According to an old comment this should have been removed in 2.6.15. Better late than never... Signed-off-by: Hans Verkuil --- linux/drivers/media/radio/radio-aztech.c | 1 - 1 file changed, 1 deletion(-) (limited to 'linux/drivers/media/radio/radio-aztech.c') diff --git a/linux/drivers/media/radio/radio-aztech.c b/linux/drivers/media/radio/radio-aztech.c index 5711f7e96..77bc931ea 100644 --- a/linux/drivers/media/radio/radio-aztech.c +++ b/linux/drivers/media/radio/radio-aztech.c @@ -370,7 +370,6 @@ static const struct v4l2_ioctl_ops aztech_ioctl_ops = { }; static struct video_device aztech_radio = { - .owner = THIS_MODULE, .name = "Aztech radio", .type = VID_TYPE_TUNER, .fops = &aztech_fops, -- cgit v1.2.3 From 9782f69f6d88cc756f9c0e0d01846779df901da8 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 26 Jul 2008 13:26:43 +0200 Subject: v4l2-dev: remove unused type and type2 field from video_device From: Hans Verkuil The type and type2 fields were unused and so could be removed. Instead add a vfl_type field that contains the type of the video device. Signed-off-by: Hans Verkuil --- linux/drivers/media/radio/radio-aztech.c | 1 - 1 file changed, 1 deletion(-) (limited to 'linux/drivers/media/radio/radio-aztech.c') diff --git a/linux/drivers/media/radio/radio-aztech.c b/linux/drivers/media/radio/radio-aztech.c index 77bc931ea..8adb1b003 100644 --- a/linux/drivers/media/radio/radio-aztech.c +++ b/linux/drivers/media/radio/radio-aztech.c @@ -371,7 +371,6 @@ static const struct v4l2_ioctl_ops aztech_ioctl_ops = { static struct video_device aztech_radio = { .name = "Aztech radio", - .type = VID_TYPE_TUNER, .fops = &aztech_fops, .ioctl_ops = &aztech_ioctl_ops, }; -- cgit v1.2.3