Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01d32d71 authored by Alexandre TORGUE's avatar Alexandre TORGUE Committed by Greg Kroah-Hartman
Browse files

serial: stm32: fix spin_lock management

parent 34891872
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -321,6 +321,8 @@ static irqreturn_t stm32_interrupt(int irq, void *ptr)
	struct stm32_usart_offsets *ofs = &stm32_port->info->ofs;
	u32 sr;

	spin_lock(&port->lock);

	sr = readl_relaxed(port->membase + ofs->isr);

	if ((sr & USART_SR_RXNE) && !(stm32_port->rx_ch))
@@ -329,6 +331,8 @@ static irqreturn_t stm32_interrupt(int irq, void *ptr)
	if ((sr & USART_SR_TXE) && !(stm32_port->tx_ch))
		stm32_transmit_chars(port);

	spin_unlock(&port->lock);

	if (stm32_port->rx_ch)
		return IRQ_WAKE_THREAD;
	else