diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-08-30 03:23:44 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-01-11 17:18:55 +0300 |
commit | d47109fa45ee2dc4e0b2710a8225e6c3ac7ea9fd (patch) | |
tree | adbf963e53caa4dc96934a558109790b35a292e7 /drivers/media/media-entity.c | |
parent | a28971ad141bf41b8d6c24f8c4e8736be0c57677 (diff) | |
download | linux-d47109fa45ee2dc4e0b2710a8225e6c3ac7ea9fd.tar.xz |
[media] media-device: remove interfaces and interface links
Just like what's done with entities, when the media controller is
unregistered, release any interface and interface links that
might still be there.
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 | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c index ceae708bdad4..ee0f81364960 100644 --- a/drivers/media/media-entity.c +++ b/drivers/media/media-entity.c @@ -674,9 +674,11 @@ static void __media_entity_remove_link(struct media_entity *entity, /* Remove the remote link */ list_del(&rlink->list); + media_gobj_remove(&rlink->graph_obj); kfree(rlink); } list_del(&link->list); + media_gobj_remove(&link->graph_obj); kfree(link); } @@ -920,11 +922,13 @@ struct media_link *media_create_intf_link(struct media_entity *entity, EXPORT_SYMBOL_GPL(media_create_intf_link); -static void __media_remove_intf_link(struct media_link *link) +void __media_remove_intf_link(struct media_link *link) { + list_del(&link->list); media_gobj_remove(&link->graph_obj); kfree(link); } +EXPORT_SYMBOL_GPL(__media_remove_intf_link); void media_remove_intf_link(struct media_link *link) { |