Skip to contentSkip to conversation

media: rc: nuvoton: simplify interrupt handling code

PATCH New Heiner Kallweit 1 participant 1 message Jun 24, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 7/9 media: rc: nuvoton: simplify interrupt handling code

Simplify interupt handling code.

---
 drivers/media/rc/nuvoton-cir.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/media/rc/nuvoton-cir.c +1 -6
index 5ce0238..180f589 100644
@@ -906,17 +906,12 @@ static irqreturn_t nvt_cir_isr(int irq, void *data)
 	if (status & CIR_IRSTS_RFO)
 		nvt_handle_rx_fifo_overrun(nvt);
 
-	if (status & CIR_IRSTS_RTR) {
+	else if (status & (CIR_IRSTS_RTR | CIR_IRSTS_PE)) {
 		/* We only do rx if not tx'ing */
 		if (nvt_cir_tx_inactive(nvt))
 			nvt_get_rx_ir_data(nvt);
 	}
 
-	if (status & CIR_IRSTS_PE) {
-		if (nvt_cir_tx_inactive(nvt))
-			nvt_get_rx_ir_data(nvt);
-	}
-
 	spin_unlock_irqrestore(&nvt->nvt_lock, flags);
 
 	if (status & CIR_IRSTS_TE)
Signature · 1 line
2.9.0