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 | 1ba58fbbe619125af113d0583c4b6bade94168d1 (patch) | |
tree | 41b0939c49a339ccb1cc64900495baa8243fdf50 /drivers/mfd/bcm2835-pm.c | |
parent | 2ddbddaf19dcdc60e05c720611faca7ba5176ed9 (diff) |
mfd: various: Use of_property_present() for testing DT property presence
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. As
part of this, convert of_get_property/of_find_property calls to the
recently added of_property_present() helper when we just want to test
for presence of a property and nothing more.
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230310144712.1543379-1-robh@kernel.org
Diffstat (limited to 'drivers/mfd/bcm2835-pm.c')
-rw-r--r-- | drivers/mfd/bcm2835-pm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/bcm2835-pm.c b/drivers/mfd/bcm2835-pm.c index 2c0aa2a2c893..3cb2b9423121 100644 --- a/drivers/mfd/bcm2835-pm.c +++ b/drivers/mfd/bcm2835-pm.c @@ -28,7 +28,7 @@ static const struct mfd_cell bcm2835_power_devs[] = { static int bcm2835_pm_get_pdata(struct platform_device *pdev, struct bcm2835_pm *pm) { - if (of_find_property(pm->dev->of_node, "reg-names", NULL)) { + if (of_property_present(pm->dev->of_node, "reg-names")) { struct resource *res; pm->base = devm_platform_ioremap_resource_byname(pdev, "pm"); |