Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

of: Use of_property_present() helper

Use of_property_present() instead of of_get_property/of_find_property()
in places where we just need to test presence of a property.

Reviewed-by: Frank Rowand <frowand.list@gmail.com>
Tested-by: Frank Rowand <frowand.list@gmail.com>
Link: https://lore.kernel.org/all/20230215215547.691573-2-robh@kernel.org/
Signed-off-by: Rob Herring <robh@kernel.org>

+2 -2
+1 -1
drivers/of/platform.c
··· 528 528 int ret; 529 529 530 530 /* Check if we have a MacOS display without a node spec */ 531 - if (of_get_property(of_chosen, "linux,bootx-noscreen", NULL)) { 531 + if (of_property_present(of_chosen, "linux,bootx-noscreen")) { 532 532 /* 533 533 * The old code tried to work out which node was the MacOS 534 534 * display based on the address. I'm dropping that since the
+1 -1
drivers/of/property.c
··· 1086 1086 np = NULL; 1087 1087 } 1088 1088 1089 - if (of_find_property(np, "compatible", NULL)) 1089 + if (of_property_present(np, "compatible")) 1090 1090 break; 1091 1091 1092 1092 np = of_get_next_parent(np);