diff options
author | Rob Herring <robh@kernel.org> | 2023-03-10 15:47:04 +0100 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2023-04-04 21:51:23 +0200 |
commit | 8c47b8253f4cfd8b4dbda8c9adc1d0b1d7f3009d (patch) | |
tree | 79a92aaaf9acdd141f71275fb25b88507a253d43 /drivers/firmware/tegra | |
parent | firmware: tegra: bpmp: Fix error paths in debugfs (diff) | |
download | linux-8c47b8253f4cfd8b4dbda8c9adc1d0b1d7f3009d.tar.xz linux-8c47b8253f4cfd8b4dbda8c9adc1d0b1d7f3009d.zip |
firmware: 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>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/firmware/tegra')
-rw-r--r-- | drivers/firmware/tegra/bpmp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/firmware/tegra/bpmp.c b/drivers/firmware/tegra/bpmp.c index 042c2043929d..8b5e5daa9fae 100644 --- a/drivers/firmware/tegra/bpmp.c +++ b/drivers/firmware/tegra/bpmp.c @@ -764,19 +764,19 @@ static int tegra_bpmp_probe(struct platform_device *pdev) if (err < 0) goto free_mrq; - if (of_find_property(pdev->dev.of_node, "#clock-cells", NULL)) { + if (of_property_present(pdev->dev.of_node, "#clock-cells")) { err = tegra_bpmp_init_clocks(bpmp); if (err < 0) goto free_mrq; } - if (of_find_property(pdev->dev.of_node, "#reset-cells", NULL)) { + if (of_property_present(pdev->dev.of_node, "#reset-cells")) { err = tegra_bpmp_init_resets(bpmp); if (err < 0) goto free_mrq; } - if (of_find_property(pdev->dev.of_node, "#power-domain-cells", NULL)) { + if (of_property_present(pdev->dev.of_node, "#power-domain-cells")) { err = tegra_bpmp_init_powergates(bpmp); if (err < 0) goto free_mrq; |