/* atc_desc_put - move a descriptor, including any children, to the free list @atchan: channel we work on @desc: descriptor, at the head of a chain, to move to free list  */
static void atc_desc_put(struct at_dma_chan *atchan, struct at_desc *desc)
/* atc_desc_put - move a descriptor, including any children, to the free list @atchan: channel we work on @desc: descriptor, at the head of a chain, to move to free list  */
static void atc_desc_put(struct at_dma_chan *atchan, struct at_desc *desc)
{
	if (desc) {
		struct at_desc *child;
		spin_lock_bh(&atchan->lock);
		list_for_each_entry(child, &desc->tx_list, desc_node)
			dev_vdbg(chan2dev(&atchan->chan_common),
					"moving child desc %p to freelist\n",
					child);
		list_splice_init(&desc->tx_list, &atchan->free_list);
		dev_vdbg(chan2dev(&atchan->chan_common),
			 "moving desc %p to freelist\n", desc);
		list_add(&desc->desc_node, &atchan->free_list);
		spin_unlock_bh(&atchan->lock);
	}
}