Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt...
[deliverable/linux.git] / drivers / media / rc / nuvoton-cir.c
index 270a687b47a2a57d4b251bdf063b930ae08cf354..00215f3438196b38dc0cc7b47363ab3814ee32ca 100644 (file)
@@ -393,6 +393,7 @@ static int nvt_hw_detect(struct nvt_dev *nvt)
        /* Check if we're wired for the alternate EFER setup */
        nvt->chip_major = nvt_cr_read(nvt, CR_CHIP_ID_HI);
        if (nvt->chip_major == 0xff) {
+               nvt_efm_disable(nvt);
                nvt->cr_efir = CR_EFIR2;
                nvt->cr_efdr = CR_EFDR2;
                nvt_efm_enable(nvt);
@@ -806,9 +807,6 @@ static void nvt_get_rx_ir_data(struct nvt_dev *nvt)
 
        /* Get count of how many bytes to read from RX FIFO */
        fifocount = nvt_cir_reg_read(nvt, CIR_RXFCONT);
-       /* if we get 0xff, probably means the logical dev is disabled */
-       if (fifocount == 0xff)
-               return;
 
        nvt_dbg("attempting to fetch %u bytes from hw rx fifo", fifocount);
 
@@ -906,17 +904,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)
This page took 0.027625 seconds and 5 git commands to generate.