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);
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);
/* 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;
}
/**
- * media_gobj_init - Initialize a graph object
+ * media_gobj_create - Initialize a graph object
*
* @mdev: Pointer to the media_device that contains the object
* @type: Type of the object
* is embedded on some other object, this function should be called before
* registering the object at the media controller.
*/
-void media_gobj_init(struct media_device *mdev,
+void media_gobj_create(struct media_device *mdev,
enum media_gobj_type type,
struct media_gobj *gobj)
{
}
/**
- * media_gobj_remove - Stop using a graph object on a media device
+ * media_gobj_destroy - Stop using a graph object on a media device
*
* @graph_obj: Pointer to the object
*
* This should be called at media_device_unregister_*() routines
*/
-void media_gobj_remove(struct media_gobj *gobj)
+void media_gobj_destroy(struct media_gobj *gobj)
{
dev_dbg_obj(__func__, gobj);
pads[i].entity = entity;
pads[i].index = i;
if (mdev)
- media_gobj_init(mdev, MEDIA_GRAPH_PAD,
+ media_gobj_create(mdev, MEDIA_GRAPH_PAD,
&entity->pads[i].graph_obj);
}
/* Remove the remote link */
list_del(&rlink->list);
- media_gobj_remove(&rlink->graph_obj);
+ media_gobj_destroy(&rlink->graph_obj);
kfree(rlink);
if (--remote->num_links == 0)
break;
}
list_del(&link->list);
- media_gobj_remove(&link->graph_obj);
+ media_gobj_destroy(&link->graph_obj);
kfree(link);
}
link->flags = flags;
/* Initialize graph object embedded at the new link */
- media_gobj_init(source->graph_obj.mdev, MEDIA_GRAPH_LINK,
+ media_gobj_create(source->graph_obj.mdev, MEDIA_GRAPH_LINK,
&link->graph_obj);
/* Create the backlink. Backlinks are used to help graph traversal and
backlink->is_backlink = true;
/* Initialize graph object embedded at the new link */
- media_gobj_init(sink->graph_obj.mdev, MEDIA_GRAPH_LINK,
+ media_gobj_create(sink->graph_obj.mdev, MEDIA_GRAPH_LINK,
&backlink->graph_obj);
link->reverse = backlink;
intf->flags = flags;
INIT_LIST_HEAD(&intf->links);
- media_gobj_init(mdev, gobj_type, &intf->graph_obj);
+ media_gobj_create(mdev, gobj_type, &intf->graph_obj);
}
/* Functions related to the media interface via device nodes */
void media_devnode_remove(struct media_intf_devnode *devnode)
{
media_remove_intf_links(&devnode->intf);
- media_gobj_remove(&devnode->intf.graph_obj);
+ media_gobj_destroy(&devnode->intf.graph_obj);
kfree(devnode);
}
EXPORT_SYMBOL_GPL(media_devnode_remove);
link->flags = flags;
/* Initialize graph object embedded at the new link */
- media_gobj_init(intf->graph_obj.mdev, MEDIA_GRAPH_LINK,
+ media_gobj_create(intf->graph_obj.mdev, MEDIA_GRAPH_LINK,
&link->graph_obj);
return link;
void __media_remove_intf_link(struct media_link *link)
{
list_del(&link->list);
- media_gobj_remove(&link->graph_obj);
+ media_gobj_destroy(&link->graph_obj);
kfree(link);
}
EXPORT_SYMBOL_GPL(__media_remove_intf_link);