summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-pxa2xx.c
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2013-10-17 14:04:47 (GMT)
committerGleb Natapov <gleb@redhat.com>2013-10-17 14:41:49 (GMT)
commit13acfd5715144518232d8e29acf7c76ef1b089d8 (patch)
tree093c4311a737210bbdd3d1919f8193cb5f017241 /drivers/spi/spi-pxa2xx.c
parentd570142674890fe10b3d7d86aa105e3dfce1ddfa (diff)
parent34ec4de42be5006abdd8d0c08b306ffaa64d0d5d (diff)
downloadlinux-13acfd5715144518232d8e29acf7c76ef1b089d8.tar.xz
Powerpc KVM work is based on a commit after rc4.
Merging master into next to satisfy the dependencies. Conflicts: arch/arm/kvm/reset.c
Diffstat (limited to 'drivers/spi/spi-pxa2xx.c')
-rw-r--r--drivers/spi/spi-pxa2xx.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index 2eb06ee..c1a5067 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -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))