in core.c [1381:1403]
void most_deregister_interface(struct most_interface *iface)
{
int i;
struct most_channel *c;
for (i = 0; i < iface->num_channels; i++) {
c = iface->p->channel[i];
if (c->pipe0.comp)
c->pipe0.comp->disconnect_channel(c->iface,
c->channel_id);
if (c->pipe1.comp)
c->pipe1.comp->disconnect_channel(c->iface,
c->channel_id);
c->pipe0.comp = NULL;
c->pipe1.comp = NULL;
list_del(&c->list);
device_unregister(&c->dev);
}
ida_simple_remove(&mdev_id, iface->p->dev_id);
kfree(iface->p);
device_unregister(iface->dev);
}