linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial: samsung: fix the inconsistency in spinlock
@ 2016-02-18 17:40 Anand Moon
  2016-02-18 17:48 ` Peter Hurley
  0 siblings, 1 reply; 11+ messages in thread
From: Anand Moon @ 2016-02-18 17:40 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby, Anand Moon
  Cc: linux-serial, linux-samsung-soc, linux-kernel

From: Anand Moon <linux.amoon@gmail.com>

changes fix the correct order of the spin_lock_irqrestore/save.

Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
 drivers/tty/serial/samsung.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
index d72cd73..96fe14d 100644
--- a/drivers/tty/serial/samsung.c
+++ b/drivers/tty/serial/samsung.c
@@ -759,9 +759,9 @@ static irqreturn_t s3c24xx_serial_tx_chars(int irq, void *id)
 	}
 
 	if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) {
-		spin_unlock(&port->lock);
+		spin_unlock_irqrestore(&port->lock, flags);
 		uart_write_wakeup(port);
-		spin_lock(&port->lock);
+		spin_lock_irqsave(&port->lock, flags);
 	}
 
 	if (uart_circ_empty(xmit))
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-02-21  1:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-18 17:40 [PATCH] serial: samsung: fix the inconsistency in spinlock Anand Moon
2016-02-18 17:48 ` Peter Hurley
2016-02-18 19:14   ` Anand Moon
2016-02-18 20:03     ` Peter Hurley
2016-02-19  6:09     ` Krzysztof Kozlowski
2016-02-19  6:51       ` Anand Moon
2016-02-19  7:44         ` Krzysztof Kozlowski
2016-02-19  8:23           ` Anand Moon
2016-02-19  8:27             ` Krzysztof Kozlowski
2016-02-19  8:34               ` Anand Moon
2016-02-21  1:30                 ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).