/* Handle IRQ for a particular DMA channel (0..15). Each DMA channel has its own IRQ.  */
static irqreturn_t stm32_dma_isr(int irq, void *dev_id)
/* Handle IRQ for a particular DMA channel (0..15). Each DMA channel has its own IRQ.  */
static irqreturn_t stm32_dma_isr(int irq, void *dev_id)
{
	int ch = (int)dev_id;
	unsigned long fl;
	spin_lock_irqsave(&dma_ch[ch].irq_lock, fl);
	if (dma_ch[ch].irq_handler) {
		dma_ch[ch].irq_handler(ch, 0, dma_ch[ch].irq_data);
	} else {
		pr_warning("Spurious IRQ for DMA channel %d\n", ch);
	}
	spin_unlock_irqrestore(&dma_ch[ch].irq_lock, fl);
	stm32_dma_clear_irq_flags(ch,
		STM32_DMA_IRQF_TC | STM32_DMA_IRQF_HT | STM32_DMA_IRQF_TE |
		STM32_DMA_IRQF_DME | STM32_DMA_IRQF_FE);
	return IRQ_HANDLED;
}