diff options
author | Julia Lawall <julia.lawall@lip6.fr> | 2016-08-05 10:56:49 +0200 |
---|---|---|
committer | Scott Wood <oss@buserror.net> | 2016-09-25 09:38:51 +0200 |
commit | 1fadfe9e19c9d3c26b3e7e9baee5e6846175ad51 (patch) | |
tree | ca16b74e7a671407a9494ade0834b69257f99381 /arch/powerpc/sysdev | |
parent | fsl/qe: use of_property_read_bool (diff) | |
download | linux-1fadfe9e19c9d3c26b3e7e9baee5e6846175ad51.tar.xz linux-1fadfe9e19c9d3c26b3e7e9baee5e6846175ad51.zip |
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 <Julia.Lawall@lip6.fr>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Scott Wood <oss@buserror.net>
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r-- | arch/powerpc/sysdev/mpic.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |