]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/s2255drv.c
V4L/DVB (8482): videodev: move all ioctl callbacks to a new v4l2_ioctl_ops struct
[linux-2.6-omap-h63xx.git] / drivers / media / video / s2255drv.c
index 04eb2c3fabd8767ad6e8d282aec7660d426a514e..2428d441fe15d8601915490c0bc55462ca9ed28b 100644 (file)
@@ -49,6 +49,7 @@
 #include <linux/version.h>
 #include <media/videobuf-vmalloc.h>
 #include <media/v4l2-common.h>
+#include <media/v4l2-ioctl.h>
 #include <linux/vmalloc.h>
 #include <linux/usb.h>
 
@@ -1658,12 +1659,7 @@ static const struct file_operations s2255_fops_v4l = {
        .llseek = no_llseek,
 };
 
-static struct video_device template = {
-       .name = "s2255v",
-       .type = VID_TYPE_CAPTURE,
-       .fops = &s2255_fops_v4l,
-       .minor = -1,
-       .release = video_device_release,
+static const struct v4l2_ioctl_ops s2255_ioctl_ops = {
        .vidioc_querycap = vidioc_querycap,
        .vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap,
        .vidioc_g_fmt_vid_cap = vidioc_g_fmt_vid_cap,
@@ -1685,6 +1681,15 @@ static struct video_device template = {
 #ifdef CONFIG_VIDEO_V4L1_COMPAT
        .vidiocgmbuf = vidioc_cgmbuf,
 #endif
+};
+
+static struct video_device template = {
+       .name = "s2255v",
+       .type = VID_TYPE_CAPTURE,
+       .fops = &s2255_fops_v4l,
+       .ioctl_ops = &s2255_ioctl_ops,
+       .minor = -1,
+       .release = video_device_release,
        .tvnorms = S2255_NORMS,
        .current_norm = V4L2_STD_NTSC_M,
 };
@@ -1706,7 +1711,7 @@ static int s2255_probe_v4l(struct s2255_dev *dev)
                /* register 4 video devices */
                dev->vdev[i] = video_device_alloc();
                memcpy(dev->vdev[i], &template, sizeof(struct video_device));
-               dev->vdev[i]->dev = &dev->interface->dev;
+               dev->vdev[i]->parent = &dev->interface->dev;
                if (video_nr == -1)
                        ret = video_register_device(dev->vdev[i],
                                                    VFL_TYPE_GRABBER,