]> git.baikalelectronics.ru Git - kernel.git/commit
mxser: call stop_rx from mxser_shutdown_port()
authorJiri Slaby <jslaby@suse.cz>
Thu, 18 Nov 2021 07:31:14 +0000 (08:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Nov 2021 17:33:21 +0000 (18:33 +0100)
commit16e4cfbbab077a5b0aee00e06d9b09769716a8e1
treeeb11e933231dc7130697ef924b8591afa3d2e0d3
parent509bb3c43e912f9ace05f5d755e5d4be6463c670
mxser: call stop_rx from mxser_shutdown_port()

mxser_stop_rx() should be called from mxser_shutdown_port() for several
reasons:
1) info->slock is held while manipulating IER (as on other places),
2) hangup now stops rx too,
3) mxser_close() will use tty_port_close() and there is no place except
   tty_port_operations::shutdown() where this can be done,
4) this is the same sequence as serial_core does. So we can map this
   code 1:1 when switching the driver to it.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20211118073125.12283-9-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/mxser.c