diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-08-23 14:40:26 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-01-11 15:18:54 +0100 |
commit | 2521fdac28d0ceea659be1620fef96b1cbff09b6 (patch) | |
tree | e507ecce63e200abfbb9853c74f9ea182b73d7d2 /drivers/media/media-entity.c | |
parent | [media] media-device: add pads and links to media_device (diff) | |
download | linux-2521fdac28d0ceea659be1620fef96b1cbff09b6.tar.xz linux-2521fdac28d0ceea659be1620fef96b1cbff09b6.zip |
[media] media_device: add a topology version field
Every time a graph object is added or removed, the version
of the topology changes. That's a requirement for the new
MEDIA_IOC_G_TOPOLOGY, in order to allow userspace to know
that the topology has changed after a previous call to it.
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/media-entity.c')
-rw-r--r-- | drivers/media/media-entity.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c index 2f3d3aae20a7..1b2fd724cdbf 100644 --- a/drivers/media/media-entity.c +++ b/drivers/media/media-entity.c @@ -173,6 +173,9 @@ void media_gobj_init(struct media_device *mdev, list_add_tail(&gobj->list, &mdev->interfaces); break; } + + mdev->topology_version++; + dev_dbg_obj(__func__, gobj); } @@ -187,6 +190,8 @@ void media_gobj_remove(struct media_gobj *gobj) { dev_dbg_obj(__func__, gobj); + gobj->mdev->topology_version++; + /* Remove the object from mdev list */ list_del(&gobj->list); } |