in core.c [689:708]
int most_remove_link(char *mdev, char *mdev_ch, char *comp_name)
{
struct most_channel *c;
struct most_component *comp;
comp = match_component(comp_name);
if (!comp)
return -ENODEV;
c = get_channel(mdev, mdev_ch);
if (!c)
return -ENODEV;
if (comp->disconnect_channel(c->iface, c->channel_id))
return -EIO;
if (c->pipe0.comp == comp)
c->pipe0.comp = NULL;
if (c->pipe1.comp == comp)
c->pipe1.comp = NULL;
return 0;
}