summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/mcf.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2022-06-24 22:42:08 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-27 14:44:20 +0200
commitae50bb2752836277ae15aa4e9d99074d6d947946 (patch)
tree935bd66924d8dabba38e7e4e88893150a348d9f2 /drivers/tty/serial/mcf.c
parentserial: 8250_lpss: Use 32-bit reads (diff)
downloadlinux-ae50bb2752836277ae15aa4e9d99074d6d947946.tar.xz
linux-ae50bb2752836277ae15aa4e9d99074d6d947946.zip
serial: take termios_rwsem for ->rs485_config() & pass termios as param
To be able to alter ADDRB within ->rs485_config(), take termios_rwsem before calling ->rs485_config() and pass termios. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20220624204210.11112-5-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/mcf.c')
-rw-r--r--drivers/tty/serial/mcf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/tty/serial/mcf.c b/drivers/tty/serial/mcf.c
index 036f178e3d66..73c5287b8e5e 100644
--- a/drivers/tty/serial/mcf.c
+++ b/drivers/tty/serial/mcf.c
@@ -431,7 +431,8 @@ static int mcf_verify_port(struct uart_port *port, struct serial_struct *ser)
/****************************************************************************/
/* Enable or disable the RS485 support */
-static int mcf_config_rs485(struct uart_port *port, struct serial_rs485 *rs485)
+static int mcf_config_rs485(struct uart_port *port, struct ktermios *termios,
+ struct serial_rs485 *rs485)
{
unsigned char mr1, mr2;