]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/media/v4l2-dev.h
V4L/DVB (6293): V4L: convert struct class_device to struct device
[linux-2.6-omap-h63xx.git] / include / media / v4l2-dev.h
index 8b79e2cf77fa1c0dffbfffd8b8af1f45b5eac1d9..e75d5e6c4cea083ed8429b1fe1adaa09d6e63cd9 100644 (file)
@@ -86,8 +86,11 @@ struct video_device
        /* device ops */
        const struct file_operations *fops;
 
+       /* sysfs */
+       struct device class_dev;        /* v4l device */
+       struct device *dev;             /* device parent */
+
        /* device info */
-       struct device *dev;
        char name[32];
        int type;       /* v4l1 */
        int type2;      /* v4l2 */
@@ -332,7 +335,6 @@ void *priv;
        /* for videodev.c intenal usage -- please don't touch */
        int users;                     /* video_exclusive_{open|close} ... */
        struct mutex lock;             /* ... helper function uses these   */
-       struct class_device class_dev; /* sysfs */
 };
 
 /* Class-dev to video-device */
@@ -360,18 +362,18 @@ extern int video_usercopy(struct inode *inode, struct file *file,
 
 static inline int __must_check
 video_device_create_file(struct video_device *vfd,
-                        struct class_device_attribute *attr)
+                        struct device_attribute *attr)
 {
-       int ret = class_device_create_file(&vfd->class_dev, attr);
+       int ret = device_create_file(&vfd->class_dev, attr);
        if (ret < 0)
                printk(KERN_WARNING "%s error: %d\n", __FUNCTION__, ret);
        return ret;
 }
 static inline void
 video_device_remove_file(struct video_device *vfd,
-                        struct class_device_attribute *attr)
+                        struct device_attribute *attr)
 {
-       class_device_remove_file(&vfd->class_dev, attr);
+       device_remove_file(&vfd->class_dev, attr);
 }
 
 #endif /* CONFIG_VIDEO_V4L1_COMPAT */