diff options
| author | Rob Herring <robh@kernel.org> | 2023-03-10 08:46:57 -0600 |
|---|---|---|
| committer | Michael Ellerman <mpe@ellerman.id.au> | 2023-03-30 23:36:35 +1100 |
| commit | 4d57e3515e3838b12eccbeb5e0e52f053e3f638a (patch) | |
| tree | 6b3a69db4051b3f6a547e34a39df8105ac149072 /arch/powerpc/platforms/powermac/pic.c | |
| parent | 857d423c74228cfa064f79ff3a16b163fdb8d542 (diff) | |
powerpc: Use of_property_read_bool() for boolean properties
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.
Convert reading boolean properties to of_property_read_bool().
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230310144659.1541127-1-robh@kernel.org
Diffstat (limited to 'arch/powerpc/platforms/powermac/pic.c')
| -rw-r--r-- | arch/powerpc/platforms/powermac/pic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c index 7425f94e271e..7135ea1d7db6 100644 --- a/arch/powerpc/platforms/powermac/pic.c +++ b/arch/powerpc/platforms/powermac/pic.c @@ -450,7 +450,7 @@ static struct mpic * __init pmac_setup_one_mpic(struct device_node *np, pmac_call_feature(PMAC_FTR_ENABLE_MPIC, np, 0, 0); - if (of_get_property(np, "big-endian", NULL)) + if (of_property_read_bool(np, "big-endian")) flags |= MPIC_BIG_ENDIAN; /* Primary Big Endian means HT interrupts. This is quite dodgy @@ -527,7 +527,7 @@ void __init pmac_pic_init(void) #ifdef CONFIG_PPC32 if (!pmac_newworld) of_irq_workarounds |= OF_IMAP_OLDWORLD_MAC; - if (of_get_property(of_chosen, "linux,bootx", NULL) != NULL) + if (of_property_read_bool(of_chosen, "linux,bootx")) of_irq_workarounds |= OF_IMAP_NO_PHANDLE; /* If we don't have phandles on a newworld, then try to locate a |