aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cafe_ccic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cafe_ccic.c')
-rw-r--r--drivers/media/video/cafe_ccic.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c
index d99453faaab7..c149b7d712e5 100644
--- a/drivers/media/video/cafe_ccic.c
+++ b/drivers/media/video/cafe_ccic.c
@@ -25,6 +25,7 @@
25#include <linux/spinlock.h> 25#include <linux/spinlock.h>
26#include <linux/videodev2.h> 26#include <linux/videodev2.h>
27#include <media/v4l2-common.h> 27#include <media/v4l2-common.h>
28#include <media/v4l2-ioctl.h>
28#include <media/v4l2-chip-ident.h> 29#include <media/v4l2-chip-ident.h>
29#include <linux/device.h> 30#include <linux/device.h>
30#include <linux/wait.h> 31#include <linux/wait.h>
@@ -1768,17 +1769,7 @@ static const struct file_operations cafe_v4l_fops = {
1768 .llseek = no_llseek, 1769 .llseek = no_llseek,
1769}; 1770};
1770 1771
1771static struct video_device cafe_v4l_template = { 1772static const struct v4l2_ioctl_ops cafe_v4l_ioctl_ops = {
1772 .name = "cafe",
1773 .type = VFL_TYPE_GRABBER,
1774 .type2 = VID_TYPE_CAPTURE,
1775 .minor = -1, /* Get one dynamically */
1776 .tvnorms = V4L2_STD_NTSC_M,
1777 .current_norm = V4L2_STD_NTSC_M, /* make mplayer happy */
1778
1779 .fops = &cafe_v4l_fops,
1780 .release = cafe_v4l_dev_release,
1781
1782 .vidioc_querycap = cafe_vidioc_querycap, 1773 .vidioc_querycap = cafe_vidioc_querycap,
1783 .vidioc_enum_fmt_vid_cap = cafe_vidioc_enum_fmt_vid_cap, 1774 .vidioc_enum_fmt_vid_cap = cafe_vidioc_enum_fmt_vid_cap,
1784 .vidioc_try_fmt_vid_cap = cafe_vidioc_try_fmt_vid_cap, 1775 .vidioc_try_fmt_vid_cap = cafe_vidioc_try_fmt_vid_cap,
@@ -1801,6 +1792,17 @@ static struct video_device cafe_v4l_template = {
1801 .vidioc_s_parm = cafe_vidioc_s_parm, 1792 .vidioc_s_parm = cafe_vidioc_s_parm,
1802}; 1793};
1803 1794
1795static struct video_device cafe_v4l_template = {
1796 .name = "cafe",
1797 .minor = -1, /* Get one dynamically */
1798 .tvnorms = V4L2_STD_NTSC_M,
1799 .current_norm = V4L2_STD_NTSC_M, /* make mplayer happy */
1800
1801 .fops = &cafe_v4l_fops,
1802 .ioctl_ops = &cafe_v4l_ioctl_ops,
1803 .release = cafe_v4l_dev_release,
1804};
1805
1804 1806
1805 1807
1806 1808
@@ -2157,7 +2159,7 @@ static int cafe_pci_probe(struct pci_dev *pdev,
2157 cam->v4ldev = cafe_v4l_template; 2159 cam->v4ldev = cafe_v4l_template;
2158 cam->v4ldev.debug = 0; 2160 cam->v4ldev.debug = 0;
2159// cam->v4ldev.debug = V4L2_DEBUG_IOCTL_ARG; 2161// cam->v4ldev.debug = V4L2_DEBUG_IOCTL_ARG;
2160 cam->v4ldev.dev = &pdev->dev; 2162 cam->v4ldev.parent = &pdev->dev;
2161 ret = video_register_device(&cam->v4ldev, VFL_TYPE_GRABBER, -1); 2163 ret = video_register_device(&cam->v4ldev, VFL_TYPE_GRABBER, -1);
2162 if (ret) 2164 if (ret)
2163 goto out_smbus; 2165 goto out_smbus;