summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/ucc_uart.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-03-10 17:47:27 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-16 15:02:14 +0300
commit822a729af4aeb451a84863ac565bdad6f64e407e (patch)
tree94ff985f7e9c92cb39bf84ce8fd586917136ca6b /drivers/tty/serial/ucc_uart.c
parentef194140308776be60dd4601bd01c00c84fb8b39 (diff)
downloadlinux-822a729af4aeb451a84863ac565bdad6f64e407e.tar.xz
serial: Use of_property_read_bool() for boolean properties
It is preferred to use typed property access functions (i.e. of_property_read_<type> functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20230310144727.1545699-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/ucc_uart.c')
-rw-r--r--drivers/tty/serial/ucc_uart.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c
index 32c7a5b43f8e..676840847962 100644
--- a/drivers/tty/serial/ucc_uart.c
+++ b/drivers/tty/serial/ucc_uart.c
@@ -1179,7 +1179,7 @@ static int soft_uart_init(struct platform_device *ofdev)
struct qe_firmware_info *qe_fw_info;
int ret;
- if (of_find_property(np, "soft-uart", NULL)) {
+ if (of_property_read_bool(np, "soft-uart")) {
dev_dbg(&ofdev->dev, "using Soft-UART mode\n");
soft_uart = 1;
} else {