struct rcar_dmac_chan *rchan = to_rcar_dmac_chan(chan);
int ret;
- INIT_LIST_HEAD(&rchan->desc.free);
- INIT_LIST_HEAD(&rchan->desc.pending);
- INIT_LIST_HEAD(&rchan->desc.active);
- INIT_LIST_HEAD(&rchan->desc.done);
- INIT_LIST_HEAD(&rchan->desc.wait);
INIT_LIST_HEAD(&rchan->desc.chunks_free);
INIT_LIST_HEAD(&rchan->desc.pages);
rchan->mid_rid = -EINVAL;
}
- list_splice(&rchan->desc.free, &list);
- list_splice(&rchan->desc.pending, &list);
- list_splice(&rchan->desc.active, &list);
- list_splice(&rchan->desc.done, &list);
- list_splice(&rchan->desc.wait, &list);
+ list_splice_init(&rchan->desc.free, &list);
+ list_splice_init(&rchan->desc.pending, &list);
+ list_splice_init(&rchan->desc.active, &list);
+ list_splice_init(&rchan->desc.done, &list);
+ list_splice_init(&rchan->desc.wait, &list);
list_for_each_entry(desc, &list, node)
rcar_dmac_realloc_hwdesc(rchan, desc, 0);
spin_lock_init(&rchan->lock);
+ INIT_LIST_HEAD(&rchan->desc.free);
+ INIT_LIST_HEAD(&rchan->desc.pending);
+ INIT_LIST_HEAD(&rchan->desc.active);
+ INIT_LIST_HEAD(&rchan->desc.done);
+ INIT_LIST_HEAD(&rchan->desc.wait);
+
/* Request the channel interrupt. */
sprintf(pdev_irqname, "ch%u", index);
irq = platform_get_irq_byname(pdev, pdev_irqname);