diff options
author | Rob Herring <robh@kernel.org> | 2023-06-09 21:33:25 +0200 |
---|---|---|
committer | Krzysztof Wilczyński <kwilczynski@kernel.org> | 2023-07-13 20:09:24 +0200 |
commit | 8f1c517ccd378a41b8c4ac951b6793ad693dbfbc (patch) | |
tree | 9d1c2aedbf762652b164217ba42bfd307094b7f9 /drivers/pci/controller | |
parent | Linux 6.5-rc1 (diff) | |
download | linux-8f1c517ccd378a41b8c4ac951b6793ad693dbfbc.tar.xz linux-8f1c517ccd378a41b8c4ac951b6793ad693dbfbc.zip |
PCI: iproc: Use of_property_read_bool() for boolean properties
Replace low-level property access functions like of_get_property() and
of_find_property() with their typed equivalents (i.e., of_property_read_<type>
functions), as it's preferred to use typed property access functions for
reading properties.
[kwilczynski: commit log]
Link: https://lore.kernel.org/linux-pci/20230609193326.1963542-1-robh@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Acked-by: Ray Jui <ray.jui@broadcom.com>
Diffstat (limited to 'drivers/pci/controller')
-rw-r--r-- | drivers/pci/controller/pcie-iproc-msi.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/pci/controller/pcie-iproc-msi.c b/drivers/pci/controller/pcie-iproc-msi.c index fee036b07cd4..649fcb449f34 100644 --- a/drivers/pci/controller/pcie-iproc-msi.c +++ b/drivers/pci/controller/pcie-iproc-msi.c @@ -525,7 +525,7 @@ int iproc_msi_init(struct iproc_pcie *pcie, struct device_node *node) if (!of_device_is_compatible(node, "brcm,iproc-msi")) return -ENODEV; - if (!of_find_property(node, "msi-controller", NULL)) + if (!of_property_read_bool(node, "msi-controller")) return -ENODEV; if (pcie->msi) @@ -585,8 +585,7 @@ int iproc_msi_init(struct iproc_pcie *pcie, struct device_node *node) return -EINVAL; } - if (of_find_property(node, "brcm,pcie-msi-inten", NULL)) - msi->has_inten_reg = true; + msi->has_inten_reg = of_property_read_bool(node, "brcm,pcie-msi-inten"); msi->nr_msi_vecs = msi->nr_irqs * EQ_LEN; msi->bitmap = devm_bitmap_zalloc(pcie->dev, msi->nr_msi_vecs, |