aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/radio-si470x.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-07-21 01:57:38 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-26 11:54:58 -0400
commita399810ca69d9d4bd30ab8c1678c7439e567f90b (patch)
tree32939ef77bc75c3a224d37cf4e885d7f808741bf /drivers/media/radio/radio-si470x.c
parentb654fcdc0ea3b6e5724c9873ae062bdfe7f28efe (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-si470x.c')
-rw-r--r--drivers/media/radio/radio-si470x.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/media/radio/radio-si470x.c b/drivers/media/radio/radio-si470x.c
index 333612180176..b829c67ecf0c 100644
--- a/drivers/media/radio/radio-si470x.c
+++ b/drivers/media/radio/radio-si470x.c
@@ -1586,15 +1586,7 @@ done:
1586 return retval; 1586 return retval;
1587} 1587}
1588 1588
1589 1589static const struct v4l2_ioctl_ops si470x_ioctl_ops = {
1590/*
1591 * si470x_viddev_tamples - video device interface
1592 */
1593static struct video_device si470x_viddev_template = {
1594 .fops = &si470x_fops,
1595 .name = DRIVER_NAME,
1596 .type = VID_TYPE_TUNER,
1597 .release = video_device_release,
1598 .vidioc_querycap = si470x_vidioc_querycap, 1590 .vidioc_querycap = si470x_vidioc_querycap,
1599 .vidioc_g_input = si470x_vidioc_g_input, 1591 .vidioc_g_input = si470x_vidioc_g_input,
1600 .vidioc_s_input = si470x_vidioc_s_input, 1592 .vidioc_s_input = si470x_vidioc_s_input,
@@ -1608,6 +1600,17 @@ static struct video_device si470x_viddev_template = {
1608 .vidioc_g_frequency = si470x_vidioc_g_frequency, 1600 .vidioc_g_frequency = si470x_vidioc_g_frequency,
1609 .vidioc_s_frequency = si470x_vidioc_s_frequency, 1601 .vidioc_s_frequency = si470x_vidioc_s_frequency,
1610 .vidioc_s_hw_freq_seek = si470x_vidioc_s_hw_freq_seek, 1602 .vidioc_s_hw_freq_seek = si470x_vidioc_s_hw_freq_seek,
1603};
1604
1605/*
1606 * si470x_viddev_tamples - video device interface
1607 */
1608static struct video_device si470x_viddev_template = {
1609 .fops = &si470x_fops,
1610 .ioctl_ops = &si470x_ioctl_ops,
1611 .name = DRIVER_NAME,
1612 .type = VID_TYPE_TUNER,
1613 .release = video_device_release,
1611 .owner = THIS_MODULE, 1614 .owner = THIS_MODULE,
1612}; 1615};
1613 1616