From: Julia Lawall Date: Fri, 5 Aug 2016 08:56:49 +0000 (+0200) Subject: powerpc/mpic: use of_property_read_bool X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1fadfe9e19c9d3c26b3e7e9baee5e6846175ad51;p=linux-beck.git 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/) // @@ expression e1,e2; statement S2,S1; @@ - if (of_get_property(e1,e2,NULL)) + if (of_property_read_bool(e1,e2)) S1 else S2 // Signed-off-by: Julia Lawall Acked-by: Michael Ellerman Signed-off-by: Scott Wood --- diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 4d48cecfedd1..b9aac951a90f 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c @@ -1249,7 +1249,7 @@ struct mpic * __init mpic_alloc(struct device_node *node, /* Pick the physical address from the device tree if unspecified */ if (!phys_addr) { /* Check if it is DCR-based */ - if (of_get_property(node, "dcr-reg", NULL)) { + if (of_property_read_bool(node, "dcr-reg")) { flags |= MPIC_USES_DCR; } else { struct resource r;