aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/v4l2-dev.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/media/v4l2-dev.h')
-rw-r--r--include/media/v4l2-dev.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index 4fe6831b1851..51b2c515f687 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -16,6 +16,8 @@
16#include <linux/mutex.h> 16#include <linux/mutex.h>
17#include <linux/videodev2.h> 17#include <linux/videodev2.h>
18 18
19#include <media/media-entity.h>
20
19#define VIDEO_MAJOR 81 21#define VIDEO_MAJOR 81
20 22
21#define VFL_TYPE_GRABBER 0 23#define VFL_TYPE_GRABBER 0
@@ -55,6 +57,9 @@ struct v4l2_file_operations {
55 57
56struct video_device 58struct video_device
57{ 59{
60#if defined(CONFIG_MEDIA_CONTROLLER)
61 struct media_entity entity;
62#endif
58 /* device ops */ 63 /* device ops */
59 const struct v4l2_file_operations *fops; 64 const struct v4l2_file_operations *fops;
60 65
@@ -100,6 +105,8 @@ struct video_device
100 struct mutex *lock; 105 struct mutex *lock;
101}; 106};
102 107
108#define media_entity_to_video_device(entity) \
109 container_of(entity, struct video_device, entity)
103/* dev to video-device */ 110/* dev to video-device */
104#define to_video_device(cd) container_of(cd, struct video_device, dev) 111#define to_video_device(cd) container_of(cd, struct video_device, dev)
105 112