summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/media/media-entity.c5
-rw-r--r--include/media/media-device.h4
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c
index 2f3d3aa..1b2fd72 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);
}
diff --git a/include/media/media-device.h b/include/media/media-device.h
index 0d1b9c6..1b12774 100644
--- a/include/media/media-device.h
+++ b/include/media/media-device.h
@@ -41,6 +41,8 @@ struct device;
* @bus_info: Unique and stable device location identifier
* @hw_revision: Hardware device revision
* @driver_version: Device driver version
+ * @topology_version: Monotonic counter for storing the version of the graph
+ * topology. Should be incremented each time the topology changes.
* @entity_id: Unique ID used on the last entity registered
* @pad_id: Unique ID used on the last pad registered
* @link_id: Unique ID used on the last link registered
@@ -74,6 +76,8 @@ struct media_device {
u32 hw_revision;
u32 driver_version;
+ u32 topology_version;
+
u32 entity_id;
u32 pad_id;
u32 link_id;