summaryrefslogtreecommitdiff
path: root/drivers/media/media-device.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-12-11 16:55:40 +0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-01-11 17:19:06 +0300
commitc350ef830f2c3dfe80e9a777c8a64ac1fb186b9a (patch)
tree4abc0b95de30e1948bdba70863b695095624a215 /drivers/media/media-device.c
parent58f69ee9da3a2486450dac626c352f69faf964e9 (diff)
downloadlinux-c350ef830f2c3dfe80e9a777c8a64ac1fb186b9a.tar.xz
[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>
Diffstat (limited to 'drivers/media/media-device.c')
-rw-r--r--drivers/media/media-device.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c
index 537160bb461e..f09f3a6f9c50 100644
--- a/drivers/media/media-device.c
+++ b/drivers/media/media-device.c
@@ -591,7 +591,7 @@ void media_device_unregister(struct media_device *mdev)
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 @@ int __must_check media_device_register_entity(struct media_device *mdev,
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 @@ void media_device_unregister_entity(struct media_entity *entity)
/* 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;