Use the correct variable holding the IRQ reason flags to check the reason for the interrupt.
Signed-off-by: Peter Ujfalusi peter.ujfalusi@ti.com ---
Hello Liam,
this patch as well with my previous series for McPDM can go for 3.1, since this is fixing the interrupt handler function.
Regards, Peter
sound/soc/omap/mcpdm.c | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/sound/soc/omap/mcpdm.c b/sound/soc/omap/mcpdm.c index 1594fe0..9746a49 100644 --- a/sound/soc/omap/mcpdm.c +++ b/sound/soc/omap/mcpdm.c @@ -283,41 +283,39 @@ static irqreturn_t omap_mcpdm_irq_handler(int irq, void *dev_id) /* Acknowledge irq event */ omap_mcpdm_write(MCPDM_IRQSTATUS, irq_status);
- if (irq & MCPDM_DN_IRQ_FULL) { + if (irq_status & MCPDM_DN_IRQ_FULL) { dev_err(mcpdm_irq->dev, "DN FIFO error %x\n", irq_status); omap_mcpdm_reset_playback(1); omap_mcpdm_playback_open(mcpdm_irq->downlink); omap_mcpdm_reset_playback(0); }
- if (irq & MCPDM_DN_IRQ_EMPTY) { + if (irq_status & MCPDM_DN_IRQ_EMPTY) { dev_err(mcpdm_irq->dev, "DN FIFO error %x\n", irq_status); omap_mcpdm_reset_playback(1); omap_mcpdm_playback_open(mcpdm_irq->downlink); omap_mcpdm_reset_playback(0); }
- if (irq & MCPDM_DN_IRQ) { + if (irq_status & MCPDM_DN_IRQ) dev_dbg(mcpdm_irq->dev, "DN write request\n"); - }
- if (irq & MCPDM_UP_IRQ_FULL) { + if (irq_status & MCPDM_UP_IRQ_FULL) { dev_err(mcpdm_irq->dev, "UP FIFO error %x\n", irq_status); omap_mcpdm_reset_capture(1); omap_mcpdm_capture_open(mcpdm_irq->uplink); omap_mcpdm_reset_capture(0); }
- if (irq & MCPDM_UP_IRQ_EMPTY) { + if (irq_status & MCPDM_UP_IRQ_EMPTY) { dev_err(mcpdm_irq->dev, "UP FIFO error %x\n", irq_status); omap_mcpdm_reset_capture(1); omap_mcpdm_capture_open(mcpdm_irq->uplink); omap_mcpdm_reset_capture(0); }
- if (irq & MCPDM_UP_IRQ) { + if (irq_status & MCPDM_UP_IRQ) dev_dbg(mcpdm_irq->dev, "UP write request\n"); - }
return IRQ_HANDLED; }