diff options
Diffstat (limited to 'include/media/v4l2-subdev.h')
-rw-r--r-- | include/media/v4l2-subdev.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index 0f9937be53d2..6f51ce4d7ee7 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h | |||
@@ -21,6 +21,7 @@ | |||
21 | #ifndef _V4L2_SUBDEV_H | 21 | #ifndef _V4L2_SUBDEV_H |
22 | #define _V4L2_SUBDEV_H | 22 | #define _V4L2_SUBDEV_H |
23 | 23 | ||
24 | #include <media/media-entity.h> | ||
24 | #include <media/v4l2-common.h> | 25 | #include <media/v4l2-common.h> |
25 | #include <media/v4l2-dev.h> | 26 | #include <media/v4l2-dev.h> |
26 | #include <media/v4l2-mediabus.h> | 27 | #include <media/v4l2-mediabus.h> |
@@ -450,6 +451,9 @@ struct v4l2_subdev_internal_ops { | |||
450 | stand-alone or embedded in a larger struct. | 451 | stand-alone or embedded in a larger struct. |
451 | */ | 452 | */ |
452 | struct v4l2_subdev { | 453 | struct v4l2_subdev { |
454 | #if defined(CONFIG_MEDIA_CONTROLLER) | ||
455 | struct media_entity entity; | ||
456 | #endif | ||
453 | struct list_head list; | 457 | struct list_head list; |
454 | struct module *owner; | 458 | struct module *owner; |
455 | u32 flags; | 459 | u32 flags; |
@@ -472,6 +476,8 @@ struct v4l2_subdev { | |||
472 | unsigned int nevents; | 476 | unsigned int nevents; |
473 | }; | 477 | }; |
474 | 478 | ||
479 | #define media_entity_to_v4l2_subdev(ent) \ | ||
480 | container_of(ent, struct v4l2_subdev, entity) | ||
475 | #define vdev_to_v4l2_subdev(vdev) \ | 481 | #define vdev_to_v4l2_subdev(vdev) \ |
476 | container_of(vdev, struct v4l2_subdev, devnode) | 482 | container_of(vdev, struct v4l2_subdev, devnode) |
477 | 483 | ||