/* Move a descriptor, including any children, to the free list.  */
static void txx9dmac_desc_put(struct txx9dmac_chan *dc, struct txx9dmac_desc *desc)
/* Move a descriptor, including any children, to the free list.  */
static void txx9dmac_desc_put(struct txx9dmac_chan *dc, struct txx9dmac_desc *desc)
{
	if (desc) {
		struct txx9dmac_desc *child;
		txx9dmac_sync_desc_for_cpu(dc, desc);
		spin_lock_bh(&dc->lock);
		list_for_each_entry(child, &desc->tx_list, desc_node)
			dev_vdbg(chan2dev(&dc->chan),
				 "moving child desc %p to freelist\n",
				 child);
		list_splice_init(&desc->tx_list, &dc->free_list);
		dev_vdbg(chan2dev(&dc->chan), "moving desc %p to freelist\n",
			 desc);
		list_add(&desc->desc_node, &dc->free_list);
		spin_unlock_bh(&dc->lock);
	}
}