/* imx_dma_setup_progression_handler - setup i.MX DMA channel progression handlers @channel: i.MX DMA channel number @prog_handler: the pointer to the function called if the transfer progresses  */
int imx_dma_setup_progression_handler(int channel, void(*prog_handler)(int, void *, struct scatterlist *))
/* imx_dma_setup_progression_handler - setup i.MX DMA channel progression handlers @channel: i.MX DMA channel number @prog_handler: the pointer to the function called if the transfer progresses  */
int imx_dma_setup_progression_handler(int channel, void(*prog_handler)(int, void *, struct scatterlist *))
{
	struct imx_dma_channel *imxdma = &imx_dma_channels[channel];
	unsigned long flags;
	if (!imxdma->name) {
		printk(KERN_CRIT "%s: called for  not allocated channel %d\n",
		       __func__, channel);
		return -ENODEV;
	}
	local_irq_save(flags);
	imxdma->prog_handler = prog_handler;
	local_irq_restore(flags);
	return 0;
}