diff options
author | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2022-06-06 13:03:58 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-06-10 13:49:24 +0200 |
commit | 8322b1f527159de578aab277629296575a11eb3c (patch) | |
tree | bd5c2f3d3ac7023c53b5c63cb2db9de3f5f7c510 /include | |
parent | af14f3007e2dca0d112f10f6717ba43093f74e81 (diff) | |
download | linux-stable-8322b1f527159de578aab277629296575a11eb3c.tar.gz linux-stable-8322b1f527159de578aab277629296575a11eb3c.tar.bz2 linux-stable-8322b1f527159de578aab277629296575a11eb3c.zip |
serial: Add uart_rs485_config()
A few serial drivers make a call to rs485_config() themselves (all
these seem to relate to init). Convert them all to use a common helper
which makes it easy to make adjustments on tasks related to it as
serial_rs485 struct sanitization is going to be added.
In pci_fintek_setup() (in 8250_pci.c), the rs485_config() call was made
with NULL, however, it can be changed to pass uart_port's rs485 struct.
No other callers should pass NULL into rs485_config() so the NULL check
can now be eliminated.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220606100433.13793-2-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/serial_core.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index cbd5070bc87f..d3ebb4db2d80 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -592,4 +592,5 @@ static inline int uart_handle_break(struct uart_port *port) !((cflag) & CLOCAL)) int uart_get_rs485_mode(struct uart_port *port); +int uart_rs485_config(struct uart_port *port); #endif /* LINUX_SERIAL_CORE_H */ |