[media] media_entity: rename media_obj functions to *_create *_destroy
Those media_obj_* functions are actually creating/destroying
media graph objects. So, rename them to better represent
what they're actually doing.
No functional changes.
This was created via this small shell script:
for i in $(git grep -l media_gobj_init); do sed s,media_gobj_init,media_gobj_create,g <$i >a && mv a $i; done
for i in $(git grep -l media_gobj_remove); do sed s,media_gobj_remove,media_gobj_destroy,g <$i >a && mv a $i; done
Suggested-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c
index 537160b..f09f3a6 100644
--- a/drivers/media/media-device.c
+++ b/drivers/media/media-device.c
@@ -591,7 +591,7 @@
list_for_each_entry_safe(intf, tmp_intf, &mdev->interfaces,
graph_obj.list) {
__media_remove_intf_links(intf);
- media_gobj_remove(&intf->graph_obj);
+ media_gobj_destroy(&intf->graph_obj);
kfree(intf);
}
spin_unlock(&mdev->lock);
@@ -628,11 +628,11 @@
spin_lock(&mdev->lock);
/* Initialize media_gobj embedded at the entity */
- media_gobj_init(mdev, MEDIA_GRAPH_ENTITY, &entity->graph_obj);
+ media_gobj_create(mdev, MEDIA_GRAPH_ENTITY, &entity->graph_obj);
/* Initialize objects at the pads */
for (i = 0; i < entity->num_pads; i++)
- media_gobj_init(mdev, MEDIA_GRAPH_PAD,
+ media_gobj_create(mdev, MEDIA_GRAPH_PAD,
&entity->pads[i].graph_obj);
spin_unlock(&mdev->lock);
@@ -673,10 +673,10 @@
/* Remove all pads that belong to this entity */
for (i = 0; i < entity->num_pads; i++)
- media_gobj_remove(&entity->pads[i].graph_obj);
+ media_gobj_destroy(&entity->pads[i].graph_obj);
/* Remove the entity */
- media_gobj_remove(&entity->graph_obj);
+ media_gobj_destroy(&entity->graph_obj);
spin_unlock(&mdev->lock);
entity->graph_obj.mdev = NULL;