/* Note: The ack-bit is positioned in the descriptor flag at creation time to make initial allocation more convenient. This bit will be cleared and control will be given to client at usage time (during preparation functions).  */
static struct at_desc* atc_alloc_descriptor(struct dma_chan *chan, gfp_t gfp_flags)
/* Note: The ack-bit is positioned in the descriptor flag at creation time to make initial allocation more convenient. This bit will be cleared and control will be given to client at usage time (during preparation functions).  */
static struct at_desc* atc_alloc_descriptor(struct dma_chan *chan, gfp_t gfp_flags)
{
	struct at_desc	*desc = NULL;
	struct at_dma	*atdma = to_at_dma(chan->device);
	dma_addr_t phys;
	desc = dma_pool_alloc(atdma->dma_desc_pool, gfp_flags, &phys);
	if (desc) {
		memset(desc, 0, sizeof(struct at_desc));
		INIT_LIST_HEAD(&desc->tx_list);
		dma_async_tx_descriptor_init(&desc->txd, chan);
		desc->txd.flags = DMA_CTRL_ACK;
		desc->txd.tx_submit = atc_tx_submit;
		desc->txd.phys = phys;
	}
	return desc;
}