serial: core: Simplify uart_get_rs485_mode()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 3 Oct 2023 14:23:46 +0000 (17:23 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Feb 2024 00:18:47 +0000 (16:18 -0800)
commit28c85cd0a671fdb453688075f33d24eee6b30afe
treeb94e780968172c57a76654facd6edbbf0ddf5668
parente961f8c6966abbd486ff87549e29e53f3c69b685
serial: core: Simplify uart_get_rs485_mode()

[ Upstream commit 7cda0b9eb6eb9e761f452e2ef4e81eca20b19938 ]

Simplify uart_get_rs485_mode() by using temporary variable for
the GPIO descriptor. With that, use proper type for the flags
of the GPIO descriptor.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20231003142346.3072929-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: 1a33e33ca0e8 ("serial: core: set missing supported flag for RX during TX GPIO")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/serial/serial_core.c