summaryrefslogtreecommitdiff
path: root/include/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-08-13 20:42:42 +0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-01-11 17:18:42 +0300
commit39a956c4147e4f696f729916f677673e9a9dc7ab (patch)
treeb5227ad98f88b16691009b6803db01f9cedd66fb /include/media
parent8f5a3188fbd13fdd5525fc6177cb19bf3996ee99 (diff)
downloadlinux-39a956c4147e4f696f729916f677673e9a9dc7ab.tar.xz
[media] media: add a debug message to warn about gobj creation/removal
It helps to check if the media controller is doing the right thing with the object creation and removal. No extra code/data will be produced if DEBUG or CONFIG_DYNAMIC_DEBUG is not enabled. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/media-entity.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/media/media-entity.h b/include/media/media-entity.h
index bf93c90e9218..96a5d3e6f6f4 100644
--- a/include/media/media-entity.h
+++ b/include/media/media-entity.h
@@ -61,6 +61,7 @@ enum media_gobj_type {
* All objects on the media graph should have this struct embedded
*/
struct media_gobj {
+ struct media_device *mdev;
u32 id;
};
@@ -199,6 +200,12 @@ struct media_entity_graph {
#define gobj_to_entity(gobj) \
container_of(gobj, struct media_entity, graph_obj)
+#define gobj_to_pad(gobj) \
+ container_of(gobj, struct media_pad, graph_obj)
+
+#define gobj_to_link(gobj) \
+ container_of(gobj, struct media_link, graph_obj)
+
void media_gobj_init(struct media_device *mdev,
enum media_gobj_type type,
struct media_gobj *gobj);