PCI: iproc: Use of_property_read_bool() for boolean properties
Rob Herring
reviewerPATCH 1/1 PCI: iproc: 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 <[email protected]>
--- drivers/pci/controller/pcie-iproc-msi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/pci/controller/pcie-iproc-msi.c +2 -3
@@ -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,
Signature · 7 lines
2.39.2 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 4 lines · Rob Herring
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().
s/to to/to/
Likely can be fixed up when applying.