diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/media/v4l2-dev.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index d62847f846c2..17f8f3a2f0a3 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h | |||
@@ -337,6 +337,9 @@ void *priv; | |||
337 | struct class_device class_dev; /* sysfs */ | 337 | struct class_device class_dev; /* sysfs */ |
338 | }; | 338 | }; |
339 | 339 | ||
340 | /* Class-dev to video-device */ | ||
341 | #define to_video_device(cd) container_of(cd, struct video_device, class_dev) | ||
342 | |||
340 | /* Version 2 functions */ | 343 | /* Version 2 functions */ |
341 | extern int video_register_device(struct video_device *vfd, int type, int nr); | 344 | extern int video_register_device(struct video_device *vfd, int type, int nr); |
342 | void video_unregister_device(struct video_device *); | 345 | void video_unregister_device(struct video_device *); |
@@ -354,11 +357,9 @@ extern int video_usercopy(struct inode *inode, struct file *file, | |||
354 | int (*func)(struct inode *inode, struct file *file, | 357 | int (*func)(struct inode *inode, struct file *file, |
355 | unsigned int cmd, void *arg)); | 358 | unsigned int cmd, void *arg)); |
356 | 359 | ||
357 | |||
358 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | 360 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
359 | #include <linux/mm.h> | 361 | #include <linux/mm.h> |
360 | 362 | ||
361 | #define to_video_device(cd) container_of(cd, struct video_device, class_dev) | ||
362 | static inline int __must_check | 363 | static inline int __must_check |
363 | video_device_create_file(struct video_device *vfd, | 364 | video_device_create_file(struct video_device *vfd, |
364 | struct class_device_attribute *attr) | 365 | struct class_device_attribute *attr) |