summaryrefslogtreecommitdiff
path: root/drivers/pci/controller/pci-tegra.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2023-04-21 00:16:32 +0300
committerBjorn Helgaas <bhelgaas@google.com>2023-04-21 00:16:32 +0300
commit66d3d0d0e860f06ec40304e792c2270e70617008 (patch)
tree4e42de809526b5d2c0be2fd0e0f8508f1048d788 /drivers/pci/controller/pci-tegra.c
parent90d66d4d86aee7a6a429081c9d95e663463ab436 (diff)
parent9195ee1a1f76033eccb424b97ee647625b7af096 (diff)
downloadlinux-66d3d0d0e860f06ec40304e792c2270e70617008.tar.xz
Merge branch 'pci/enumeration'
- Use of_property_present(), instead of lower-level functions like of_get_property(), for testing DT property presence (Rob Herring) * pci/enumeration: PCI: Use of_property_present() for testing DT property presence
Diffstat (limited to 'drivers/pci/controller/pci-tegra.c')
-rw-r--r--drivers/pci/controller/pci-tegra.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/controller/pci-tegra.c b/drivers/pci/controller/pci-tegra.c
index 74c109f14ff0..79630885b9c8 100644
--- a/drivers/pci/controller/pci-tegra.c
+++ b/drivers/pci/controller/pci-tegra.c
@@ -1375,7 +1375,7 @@ static int tegra_pcie_phys_get(struct tegra_pcie *pcie)
struct tegra_pcie_port *port;
int err;
- if (!soc->has_gen2 || of_find_property(np, "phys", NULL) != NULL)
+ if (!soc->has_gen2 || of_property_present(np, "phys"))
return tegra_pcie_phys_get_legacy(pcie);
list_for_each_entry(port, &pcie->ports, list) {
@@ -1944,7 +1944,7 @@ static bool of_regulator_bulk_available(struct device_node *np,
for (i = 0; i < num_supplies; i++) {
snprintf(property, 32, "%s-supply", supplies[i].supply);
- if (of_find_property(np, property, NULL) == NULL)
+ if (!of_property_present(np, property))
return false;
}