[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1346935540-1792-12-git-send-email-balbi@ti.com>
Date: Thu, 6 Sep 2012 15:45:30 +0300
From: Felipe Balbi <balbi@...com>
To: Greg KH <gregkh@...uxfoundation.org>
Cc: alan@...ux.intel.com, Tony Lindgren <tony@...mide.com>,
Kevin Hilman <khilman@...com>,
Linux OMAP Mailing List <linux-omap@...r.kernel.org>,
Linux ARM Kernel Mailing List
<linux-arm-kernel@...ts.infradead.org>,
linux-serial@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Santosh Shilimkar <santosh.shilimkar@...com>,
Shubhrajyoti Datta <shubhrajyoti@...com>,
Sourav Poddar <sourav.poddar@...com>,
Felipe Balbi <balbi@...com>
Subject: [PATCH v4 11/21] serial: omap: don't save IRQ flags on hardirq
When we're running our hardirq handler, there's
not need to disable IRQs with spin_lock_irqsave()
because IRQs are already disabled. It also makes
no difference if we save or not IRQ flags.
Switch over to simple spin_lock/spin_unlock and
drop the "flags" variable.
Tested-by: Shubhrajyoti D <shubhrajyoti@...com>
Signed-off-by: Felipe Balbi <balbi@...com>
---
drivers/tty/serial/omap-serial.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index 0ceca44..99042b0 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -351,11 +351,10 @@ static inline irqreturn_t serial_omap_irq(int irq, void *dev_id)
struct tty_struct *tty = up->port.state->port.tty;
unsigned int iir, lsr;
unsigned int type;
- unsigned long flags;
irqreturn_t ret = IRQ_NONE;
int max_count = 256;
- spin_lock_irqsave(&up->port.lock, flags);
+ spin_lock(&up->port.lock);
pm_runtime_get_sync(up->dev);
do {
@@ -394,7 +393,7 @@ static inline irqreturn_t serial_omap_irq(int irq, void *dev_id)
}
} while (!(iir & UART_IIR_NO_INT) && max_count--);
- spin_unlock_irqrestore(&up->port.lock, flags);
+ spin_unlock(&up->port.lock);
tty_flip_buffer_push(tty);
--
1.7.12.rc3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists