[media-ctl PATCH 5/7] Add link to media_device from the media_entity

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This makes it possible to obtain the media device an entity belongs to.

Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxx>
---
 src/mediactl.c |    1 +
 src/mediactl.h |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/mediactl.c b/src/mediactl.c
index a03c19a..8cc338d 100644
--- a/src/mediactl.c
+++ b/src/mediactl.c
@@ -372,6 +372,7 @@ static int media_enum_entities(struct media_device *media, int verbose)
 		memset(entity, 0, sizeof(*entity));
 		entity->fd = -1;
 		entity->info.id = id | MEDIA_ENT_ID_FLAG_NEXT;
+		entity->media = media;
 
 		ret = ioctl(media->fd, MEDIA_IOC_ENUM_ENTITIES, &entity->info);
 		if (ret < 0) {
diff --git a/src/mediactl.h b/src/mediactl.h
index 9ebad9f..98b47fd 100644
--- a/src/mediactl.h
+++ b/src/mediactl.h
@@ -38,6 +38,7 @@ struct media_pad {
 };
 
 struct media_entity {
+	struct media_device *media;
 	struct media_entity_desc info;
 	struct media_pad *pads;
 	struct media_link *links;
-- 
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux