tty: serial, join uport checks in uart_port_shutdown()
There are two consequent checks of uport != NULL in uart_port_shutdown(). Join these two under a single block. De-multiline the comments when shuffling with them anyway. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20211118071911.12059-5-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
954a0881a9
commit
2765852e74
@ -1685,17 +1685,13 @@ static void uart_port_shutdown(struct tty_port *port)
|
|||||||
*/
|
*/
|
||||||
wake_up_interruptible(&port->delta_msr_wait);
|
wake_up_interruptible(&port->delta_msr_wait);
|
||||||
|
|
||||||
/*
|
if (uport) {
|
||||||
* Free the IRQ and disable the port.
|
/* Free the IRQ and disable the port. */
|
||||||
*/
|
|
||||||
if (uport)
|
|
||||||
uport->ops->shutdown(uport);
|
uport->ops->shutdown(uport);
|
||||||
|
|
||||||
/*
|
/* Ensure that the IRQ handler isn't running on another CPU. */
|
||||||
* Ensure that the IRQ handler isn't running on another CPU.
|
|
||||||
*/
|
|
||||||
if (uport)
|
|
||||||
synchronize_irq(uport->irq);
|
synchronize_irq(uport->irq);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int uart_carrier_raised(struct tty_port *port)
|
static int uart_carrier_raised(struct tty_port *port)
|
||||||
|
Reference in New Issue
Block a user