Skip to content

Commit a9c6a1f

Browse files
robherringjernejsk
authored andcommitted
soc: sunxi: 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 <[email protected]> Reviewed-by: Jernej Skrabec <[email protected]> Reviewed-by: Andre Przywara <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jernej Skrabec <[email protected]>
1 parent fe15c26 commit a9c6a1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/soc/sunxi/sunxi_mbus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static int sunxi_mbus_notifier(struct notifier_block *nb,
8282
* Older DTs or SoCs who are not clearly understood need to set
8383
* that DMA offset though.
8484
*/
85-
if (of_find_property(dev->of_node, "interconnects", NULL))
85+
if (of_property_present(dev->of_node, "interconnects"))
8686
return NOTIFY_DONE;
8787

8888
ret = dma_direct_set_offset(dev, PHYS_OFFSET, 0, SZ_4G);

0 commit comments

Comments
 (0)