Skip to content

Commit 1fadfe9

Browse files
JuliaLawallScott Wood
authored andcommitted
powerpc/mpic: use of_property_read_bool
Use of_property_read_bool to check for the existence of a property. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e1,e2; statement S2,S1; @@ - if (of_get_property(e1,e2,NULL)) + if (of_property_read_bool(e1,e2)) S1 else S2 // </smpl> Signed-off-by: Julia Lawall <[email protected]> Acked-by: Michael Ellerman <[email protected]> Signed-off-by: Scott Wood <[email protected]>
1 parent 74c269f commit 1fadfe9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/powerpc/sysdev/mpic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1249,7 +1249,7 @@ struct mpic * __init mpic_alloc(struct device_node *node,
12491249
/* Pick the physical address from the device tree if unspecified */
12501250
if (!phys_addr) {
12511251
/* Check if it is DCR-based */
1252-
if (of_get_property(node, "dcr-reg", NULL)) {
1252+
if (of_property_read_bool(node, "dcr-reg")) {
12531253
flags |= MPIC_USES_DCR;
12541254
} else {
12551255
struct resource r;

0 commit comments

Comments
 (0)