Skip to content

Commit

Permalink
PCI: dwc: Use of_property_present() for non-boolean properties
Browse files Browse the repository at this point in the history
The use of of_property_read_bool() for non-boolean properties is
deprecated in favor of of_property_present() when testing for property
presence.

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Rob Herring (Arm) <[email protected]>
Signed-off-by: Krzysztof Wilczyński <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Acked-by: Manivannan Sadhasivam <[email protected]>
  • Loading branch information
robherring authored and kwilczynski committed Nov 16, 2024
1 parent 12dd128 commit 154fc1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/pci/controller/dwc/pcie-designware-host.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,8 @@ int dw_pcie_host_init(struct dw_pcie_rp *pp)

if (pci_msi_enabled()) {
pp->has_msi_ctrl = !(pp->ops->msi_init ||
of_property_read_bool(np, "msi-parent") ||
of_property_read_bool(np, "msi-map"));
of_property_present(np, "msi-parent") ||
of_property_present(np, "msi-map"));

/*
* For the has_msi_ctrl case the default assignment is handled
Expand Down

0 comments on commit 154fc1f

Please sign in to comment.