aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/media/v4l2-dev.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index 8b79e2cf77fa..e75d5e6c4cea 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -86,8 +86,11 @@ struct video_device
86 /* device ops */ 86 /* device ops */
87 const struct file_operations *fops; 87 const struct file_operations *fops;
88 88
89 /* sysfs */
90 struct device class_dev; /* v4l device */
91 struct device *dev; /* device parent */
92
89 /* device info */ 93 /* device info */
90 struct device *dev;
91 char name[32]; 94 char name[32];
92 int type; /* v4l1 */ 95 int type; /* v4l1 */
93 int type2; /* v4l2 */ 96 int type2; /* v4l2 */
@@ -332,7 +335,6 @@ void *priv;
332 /* for videodev.c intenal usage -- please don't touch */ 335 /* for videodev.c intenal usage -- please don't touch */
333 int users; /* video_exclusive_{open|close} ... */ 336 int users; /* video_exclusive_{open|close} ... */
334 struct mutex lock; /* ... helper function uses these */ 337 struct mutex lock; /* ... helper function uses these */
335 struct class_device class_dev; /* sysfs */
336}; 338};
337 339
338/* Class-dev to video-device */ 340/* Class-dev to video-device */
@@ -360,18 +362,18 @@ extern int video_usercopy(struct inode *inode, struct file *file,
360 362
361static inline int __must_check 363static inline int __must_check
362video_device_create_file(struct video_device *vfd, 364video_device_create_file(struct video_device *vfd,
363 struct class_device_attribute *attr) 365 struct device_attribute *attr)
364{ 366{
365 int ret = class_device_create_file(&vfd->class_dev, attr); 367 int ret = device_create_file(&vfd->class_dev, attr);
366 if (ret < 0) 368 if (ret < 0)
367 printk(KERN_WARNING "%s error: %d\n", __FUNCTION__, ret); 369 printk(KERN_WARNING "%s error: %d\n", __FUNCTION__, ret);
368 return ret; 370 return ret;
369} 371}
370static inline void 372static inline void
371video_device_remove_file(struct video_device *vfd, 373video_device_remove_file(struct video_device *vfd,
372 struct class_device_attribute *attr) 374 struct device_attribute *attr)
373{ 375{
374 class_device_remove_file(&vfd->class_dev, attr); 376 device_remove_file(&vfd->class_dev, attr);
375} 377}
376 378
377#endif /* CONFIG_VIDEO_V4L1_COMPAT */ 379#endif /* CONFIG_VIDEO_V4L1_COMPAT */