Skip to content

Commit 538c7b5

Browse files
robherringkrzk
authored andcommitted
memory: atmel-ebi: 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]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Krzysztof Kozlowski <[email protected]>
1 parent d2456dd commit 538c7b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/memory/atmel-ebi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ static int atmel_ebi_probe(struct platform_device *pdev)
598598
reg_cells += val;
599599

600600
for_each_available_child_of_node(np, child) {
601-
if (!of_find_property(child, "reg", NULL))
601+
if (!of_property_present(child, "reg"))
602602
continue;
603603

604604
ret = atmel_ebi_dev_setup(ebi, child, reg_cells);

0 commit comments

Comments
 (0)