Skip to content

Commit 70dc8a0

Browse files
robherringShawn Guo
authored andcommitted
ARM: mxs: 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> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
1 parent e87f3be commit 70dc8a0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/arm/mach-mxs/mach-mxs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ static void __init update_fec_mac_prop(enum mac_oui oui)
174174

175175
from = np;
176176

177-
if (of_get_property(np, "local-mac-address", NULL))
177+
if (of_property_present(np, "local-mac-address"))
178178
continue;
179179

180180
newmac = kzalloc(sizeof(*newmac) + 6, GFP_KERNEL);

0 commit comments

Comments
 (0)