[media] media: rc: nuvoton: replace usage of spin_lock_irqsave in ISR
authorHeiner Kallweit <hkallweit1@gmail.com>
Tue, 25 Oct 2016 19:23:52 +0000 (17:23 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 18 Nov 2016 19:08:15 +0000 (17:08 -0200)
Kernel takes care that interrupts from one source are serialized.
So there's no need to use spinlock_irq_save.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/rc/nuvoton-cir.c

index c335de4ca4b56f0eb56e0a847b69aafdcc51b8d5..4b78c891eb7794935390b7bd60aacb4fb6a0886c 100644 (file)
@@ -840,11 +840,10 @@ static irqreturn_t nvt_cir_isr(int irq, void *data)
 {
        struct nvt_dev *nvt = data;
        u8 status, iren;
-       unsigned long flags;
 
        nvt_dbg_verbose("%s firing", __func__);
 
-       spin_lock_irqsave(&nvt->lock, flags);
+       spin_lock(&nvt->lock);
 
        /*
         * Get IR Status register contents. Write 1 to ack/clear
@@ -866,7 +865,7 @@ static irqreturn_t nvt_cir_isr(int irq, void *data)
         * logical device is being disabled.
         */
        if (status == 0xff && iren == 0xff) {
-               spin_unlock_irqrestore(&nvt->lock, flags);
+               spin_unlock(&nvt->lock);
                nvt_dbg_verbose("Spurious interrupt detected");
                return IRQ_HANDLED;
        }
@@ -875,7 +874,7 @@ static irqreturn_t nvt_cir_isr(int irq, void *data)
         * status bit whether the related interrupt source is enabled
         */
        if (!(status & iren)) {
-               spin_unlock_irqrestore(&nvt->lock, flags);
+               spin_unlock(&nvt->lock);
                nvt_dbg_verbose("%s exiting, IRSTS 0x0", __func__);
                return IRQ_NONE;
        }
@@ -923,7 +922,7 @@ static irqreturn_t nvt_cir_isr(int irq, void *data)
                }
        }
 
-       spin_unlock_irqrestore(&nvt->lock, flags);
+       spin_unlock(&nvt->lock);
 
        nvt_dbg_verbose("%s done", __func__);
        return IRQ_HANDLED;