lkml.org 
[lkml]   [2022]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] serial: 8250_bcm7271: move spin_lock_irqsave to spin_lock in irq handler
Date
it is unnecessary to call spin_lock_irqsave in a irq handler.

Signed-off-by: Tuo Cao <91tuocao@gmail.com>
---
drivers/tty/serial/8250/8250_bcm7271.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_bcm7271.c b/drivers/tty/serial/8250/8250_bcm7271.c
index 8efdc271eb75..fb525c435723 100644
--- a/drivers/tty/serial/8250/8250_bcm7271.c
+++ b/drivers/tty/serial/8250/8250_bcm7271.c
@@ -560,7 +560,6 @@ static irqreturn_t brcmuart_isr(int irq, void *dev_id)
struct uart_port *up = dev_id;
struct device *dev = up->dev;
struct brcmuart_priv *priv = up->private_data;
- unsigned long flags;
u32 interrupts;
u32 rval;
u32 tval;
@@ -569,7 +568,7 @@ static irqreturn_t brcmuart_isr(int irq, void *dev_id)
if (interrupts == 0)
return IRQ_NONE;

- spin_lock_irqsave(&up->lock, flags);
+ spin_lock(&up->lock);

/* Clear all interrupts */
udma_writel(priv, REGS_DMA_ISR, UDMA_INTR_CLEAR, interrupts);
@@ -583,7 +582,7 @@ static irqreturn_t brcmuart_isr(int irq, void *dev_id)
if ((rval | tval) == 0)
dev_warn(dev, "Spurious interrupt: 0x%x\n", interrupts);

- spin_unlock_irqrestore(&up->lock, flags);
+ spin_unlock(&up->lock);
return IRQ_HANDLED;
}

--
2.17.1
\
 
 \ /
  Last update: 2022-08-13 17:55    [W:0.042 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site