summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/sh-sci.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-03-10 17:47:26 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-16 15:02:11 +0300
commitef194140308776be60dd4601bd01c00c84fb8b39 (patch)
treea035b982cabdd9dcb6265e8a6f78161b537c528e /drivers/tty/serial/sh-sci.c
parent571079f5ba93f08ac2563d40e46d42d56615c096 (diff)
downloadlinux-ef194140308776be60dd4601bd01c00c84fb8b39.tar.xz
serial: Use of_property_present() for testing DT property presence
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. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. 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.1545630-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/sh-sci.c')
-rw-r--r--drivers/tty/serial/sh-sci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 7bd080720929..a3e12e985e0d 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -1573,7 +1573,7 @@ static void sci_request_dma(struct uart_port *port)
* Don't request a dma channel if no channel was specified
* in the device tree.
*/
- if (!of_find_property(port->dev->of_node, "dmas", NULL))
+ if (!of_property_present(port->dev->of_node, "dmas"))
return;
chan = sci_request_dma_chan(port, DMA_MEM_TO_DEV);