summaryrefslogtreecommitdiffstats
path: root/target/linux/omap24xx/patches-2.6.38/506-cbus-retu-irq-handler-locking.patch
blob: 7729327a0d7fbe877040a9d0b747f202cfd78217 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--- a/drivers/cbus/retu.c
+++ b/drivers/cbus/retu.c
@@ -198,10 +198,12 @@ static irqreturn_t retu_irq_handler(int
 	u16			idr;
 	u16			imr;
 
+	mutex_lock(&retu->mutex);
 	idr = __retu_read_reg(retu, RETU_REG_IDR);
 	imr = __retu_read_reg(retu, RETU_REG_IMR);
-	idr &= ~imr;
+	mutex_unlock(&retu->mutex);
 
+	idr &= ~imr;
 	if (!idr) {
 		dev_vdbg(retu->dev, "No IRQ, spurious?\n");
 		return IRQ_NONE;