diff options
author | Rob Herring <robh@kernel.org> | 2023-03-10 08:47:12 -0600 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2023-04-26 11:40:32 +0100 |
commit | 01330edcc5ecc92eb9152b27f326618735900502 (patch) | |
tree | f2e4080460b13a0806ca3868ba8081f0e3003300 /drivers/mfd/88pm860x-core.c | |
parent | 1ba58fbbe619125af113d0583c4b6bade94168d1 (diff) | |
download | lwn-01330edcc5ecc92eb9152b27f326618735900502.tar.gz lwn-01330edcc5ecc92eb9152b27f326618735900502.zip |
mfd: various: 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 to of_property_read_bool().
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230310144712.1543449-1-robh@kernel.org
Diffstat (limited to 'drivers/mfd/88pm860x-core.c')
-rw-r--r-- | drivers/mfd/88pm860x-core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mfd/88pm860x-core.c b/drivers/mfd/88pm860x-core.c index 3c57e537d57f..aabac37c3502 100644 --- a/drivers/mfd/88pm860x-core.c +++ b/drivers/mfd/88pm860x-core.c @@ -1117,8 +1117,7 @@ static int pm860x_dt_init(struct device_node *np, { int ret; - if (of_get_property(np, "marvell,88pm860x-irq-read-clr", NULL)) - pdata->irq_mode = 1; + pdata->irq_mode = of_property_read_bool(np, "marvell,88pm860x-irq-read-clr"); ret = of_property_read_u32(np, "marvell,88pm860x-slave-addr", &pdata->companion_addr); if (ret) { |