drivers: uart_ns16550: Fix dts hw_flow_control mapping to config

DT_INST_NODE_HAS_PROP() returns true always since the boolean
tag is valid. Use DT_INST_PROP_OR() to get the real value.

Fixes: baecd7e55a drivers: uart_ns16550: Remove CMake-based templating
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
This commit is contained in:
Timo Teräs 2021-08-17 18:46:09 +03:00 committed by Christopher Friedt
parent 267a83e94b
commit 1eb6831ddd

View file

@ -1080,7 +1080,7 @@ static const struct uart_driver_api uart_ns16550_driver_api = {
#define DEV_DATA_FLOW_CTRL0 UART_CFG_FLOW_CTRL_NONE
#define DEV_DATA_FLOW_CTRL1 UART_CFG_FLOW_CTRL_RTS_CTS
#define DEV_DATA_FLOW_CTRL(n) \
_CONCAT(DEV_DATA_FLOW_CTRL, DT_INST_NODE_HAS_PROP(n, hw_flow_control))
_CONCAT(DEV_DATA_FLOW_CTRL, DT_INST_PROP_OR(n, hw_flow_control, 0))
#define DEV_DATA_DLF0(n)
#define DEV_DATA_DLF1(n) \