aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cafe_ccic.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/video/cafe_ccic.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/video/cafe_ccic.c')
-rw-r--r--drivers/media/video/cafe_ccic.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c
index 302c57f151c2..4bbea458d0c0 100644
--- a/drivers/media/video/cafe_ccic.c
+++ b/drivers/media/video/cafe_ccic.c
@@ -1769,17 +1769,7 @@ static const struct file_operations cafe_v4l_fops = {
1769 .llseek = no_llseek, 1769 .llseek = no_llseek,
1770}; 1770};
1771 1771
1772static struct video_device cafe_v4l_template = { 1772static const struct v4l2_ioctl_ops cafe_v4l_ioctl_ops = {
1773 .name = "cafe",
1774 .type = VFL_TYPE_GRABBER,
1775 .type2 = VID_TYPE_CAPTURE,
1776 .minor = -1, /* Get one dynamically */
1777 .tvnorms = V4L2_STD_NTSC_M,
1778 .current_norm = V4L2_STD_NTSC_M, /* make mplayer happy */
1779
1780 .fops = &cafe_v4l_fops,
1781 .release = cafe_v4l_dev_release,
1782
1783 .vidioc_querycap = cafe_vidioc_querycap, 1773 .vidioc_querycap = cafe_vidioc_querycap,
1784 .vidioc_enum_fmt_vid_cap = cafe_vidioc_enum_fmt_vid_cap, 1774 .vidioc_enum_fmt_vid_cap = cafe_vidioc_enum_fmt_vid_cap,
1785 .vidioc_try_fmt_vid_cap = cafe_vidioc_try_fmt_vid_cap, 1775 .vidioc_try_fmt_vid_cap = cafe_vidioc_try_fmt_vid_cap,
@@ -1802,6 +1792,19 @@ static struct video_device cafe_v4l_template = {
1802 .vidioc_s_parm = cafe_vidioc_s_parm, 1792 .vidioc_s_parm = cafe_vidioc_s_parm,
1803}; 1793};
1804 1794
1795static struct video_device cafe_v4l_template = {
1796 .name = "cafe",
1797 .type = VFL_TYPE_GRABBER,
1798 .type2 = VID_TYPE_CAPTURE,
1799 .minor = -1, /* Get one dynamically */
1800 .tvnorms = V4L2_STD_NTSC_M,
1801 .current_norm = V4L2_STD_NTSC_M, /* make mplayer happy */
1802
1803 .fops = &cafe_v4l_fops,
1804 .ioctl_ops = &cafe_v4l_ioctl_ops,
1805 .release = cafe_v4l_dev_release,
1806};
1807
1805 1808
1806 1809
1807 1810