V4L/DVB (11374): v4l2-common: add v4l2_i2c_new_probed_subdev_addr
[safe/jmp/linux-2.6] / include / media / v4l2-dev.h
index 0a88d1d..2058dd4 100644 (file)
@@ -25,6 +25,7 @@
 #define VFL_TYPE_MAX           4
 
 struct v4l2_ioctl_callbacks;
+struct video_device;
 struct v4l2_device;
 
 /* Flag to mark the video_device struct as unregistered.
@@ -32,6 +33,20 @@ struct v4l2_device;
    device access. It is set by video_unregister_device. */
 #define V4L2_FL_UNREGISTERED   (0)
 
+struct v4l2_file_operations {
+       struct module *owner;
+       ssize_t (*read) (struct file *, char __user *, size_t, loff_t *);
+       ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
+       unsigned int (*poll) (struct file *, struct poll_table_struct *);
+       long (*ioctl) (struct file *, unsigned int, unsigned long);
+       long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
+       unsigned long (*get_unmapped_area) (struct file *, unsigned long,
+                               unsigned long, unsigned long, unsigned long);
+       int (*mmap) (struct file *, struct vm_area_struct *);
+       int (*open) (struct file *);
+       int (*release) (struct file *);
+};
+
 /*
  * Newer version of video_device, handled by videodev2.c
  *     This version moves redundant code from video device code to
@@ -41,7 +56,7 @@ struct v4l2_device;
 struct video_device
 {
        /* device ops */
-       const struct file_operations *fops;
+       const struct v4l2_file_operations *fops;
 
        /* sysfs */
        struct device dev;              /* v4l device */