diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-07-21 01:57:38 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-26 11:54:58 -0400 |
commit | a399810ca69d9d4bd30ab8c1678c7439e567f90b (patch) | |
tree | 32939ef77bc75c3a224d37cf4e885d7f808741bf /drivers/media/radio/radio-zoltrix.c | |
parent | b654fcdc0ea3b6e5724c9873ae062bdfe7f28efe (diff) |
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>
Diffstat (limited to 'drivers/media/radio/radio-zoltrix.c')
-rw-r--r-- | drivers/media/radio/radio-zoltrix.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/media/radio/radio-zoltrix.c b/drivers/media/radio/radio-zoltrix.c index cf0355bb6ef7..c60344326cd6 100644 --- a/drivers/media/radio/radio-zoltrix.c +++ b/drivers/media/radio/radio-zoltrix.c | |||
@@ -408,12 +408,7 @@ static const struct file_operations zoltrix_fops = | |||
408 | .llseek = no_llseek, | 408 | .llseek = no_llseek, |
409 | }; | 409 | }; |
410 | 410 | ||
411 | static struct video_device zoltrix_radio = | 411 | static const struct v4l2_ioctl_ops zoltrix_ioctl_ops = { |
412 | { | ||
413 | .owner = THIS_MODULE, | ||
414 | .name = "Zoltrix Radio Plus", | ||
415 | .type = VID_TYPE_TUNER, | ||
416 | .fops = &zoltrix_fops, | ||
417 | .vidioc_querycap = vidioc_querycap, | 412 | .vidioc_querycap = vidioc_querycap, |
418 | .vidioc_g_tuner = vidioc_g_tuner, | 413 | .vidioc_g_tuner = vidioc_g_tuner, |
419 | .vidioc_s_tuner = vidioc_s_tuner, | 414 | .vidioc_s_tuner = vidioc_s_tuner, |
@@ -428,6 +423,14 @@ static struct video_device zoltrix_radio = | |||
428 | .vidioc_s_ctrl = vidioc_s_ctrl, | 423 | .vidioc_s_ctrl = vidioc_s_ctrl, |
429 | }; | 424 | }; |
430 | 425 | ||
426 | static struct video_device zoltrix_radio = { | ||
427 | .owner = THIS_MODULE, | ||
428 | .name = "Zoltrix Radio Plus", | ||
429 | .type = VID_TYPE_TUNER, | ||
430 | .fops = &zoltrix_fops, | ||
431 | .ioctl_ops = &zoltrix_ioctl_ops, | ||
432 | }; | ||
433 | |||
431 | static int __init zoltrix_init(void) | 434 | static int __init zoltrix_init(void) |
432 | { | 435 | { |
433 | if (io == -1) { | 436 | if (io == -1) { |