in core.c [464:492]
static int print_links(struct device *dev, void *data)
{
struct show_links_data *d = data;
int offs = d->offs;
char *buf = d->buf;
struct most_channel *c;
struct most_interface *iface = dev_get_drvdata(dev);
list_for_each_entry(c, &iface->p->channel_list, list) {
if (c->pipe0.comp) {
offs += scnprintf(buf + offs,
PAGE_SIZE - offs,
"%s:%s:%s\n",
c->pipe0.comp->name,
dev_name(iface->dev),
dev_name(&c->dev));
}
if (c->pipe1.comp) {
offs += scnprintf(buf + offs,
PAGE_SIZE - offs,
"%s:%s:%s\n",
c->pipe1.comp->name,
dev_name(iface->dev),
dev_name(&c->dev));
}
}
d->offs = offs;
return 0;
}