summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/pseries/vio.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-03-10 08:46:56 -0600
committerMichael Ellerman <mpe@ellerman.id.au>2023-03-30 23:36:35 +1100
commit857d423c74228cfa064f79ff3a16b163fdb8d542 (patch)
tree42cebf275a0709c63da9bda60d200c95ddaa4f51 /arch/powerpc/platforms/pseries/vio.c
parentaf8bc68263b2184e63ee67ca70cecff4636f7901 (diff)
powerpc: 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> [mpe: Drop change in ppc4xx_probe_pci_bridge(), formatting] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230310144657.1541039-1-robh@kernel.org
Diffstat (limited to 'arch/powerpc/platforms/pseries/vio.c')
-rw-r--r--arch/powerpc/platforms/pseries/vio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/pseries/vio.c b/arch/powerpc/platforms/pseries/vio.c
index 770df9351aaa..d54306a936d5 100644
--- a/arch/powerpc/platforms/pseries/vio.c
+++ b/arch/powerpc/platforms/pseries/vio.c
@@ -1440,7 +1440,7 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node)
viodev->dev.bus = &vio_bus_type;
viodev->dev.release = vio_dev_release;
- if (of_get_property(viodev->dev.of_node, "ibm,my-dma-window", NULL)) {
+ if (of_property_present(viodev->dev.of_node, "ibm,my-dma-window")) {
if (firmware_has_feature(FW_FEATURE_CMO))
vio_cmo_set_dma_ops(viodev);
else