Merge remote-tracking branch 'spi/fix/pxa' into spi-linus
authorMark Brown <broonie@linaro.org>
Mon, 7 Oct 2013 13:51:59 +0000 (14:51 +0100)
committerMark Brown <broonie@linaro.org>
Mon, 7 Oct 2013 13:51:59 +0000 (14:51 +0100)
drivers/spi/spi-pxa2xx.c

index 2eb06ee..c1a5067 100644 (file)
@@ -546,8 +546,17 @@ static irqreturn_t ssp_int(int irq, void *dev_id)
        if (pm_runtime_suspended(&drv_data->pdev->dev))
                return IRQ_NONE;
 
-       sccr1_reg = read_SSCR1(reg);
+       /*
+        * If the device is not yet in RPM suspended state and we get an
+        * interrupt that is meant for another device, check if status bits
+        * are all set to one. That means that the device is already
+        * powered off.
+        */
        status = read_SSSR(reg);
+       if (status == ~0)
+               return IRQ_NONE;
+
+       sccr1_reg = read_SSCR1(reg);
 
        /* Ignore possible writes if we don't need to write */
        if (!(sccr1_reg & SSCR1_TIE))