Skip to content

Commit 270ddc2

Browse files
robherringbroonie
authored andcommitted
spi: Use of_property_present() for non-boolean properties
The use of of_property_read_bool() for non-boolean properties is deprecated in favor of of_property_present() when testing for property presence. Signed-off-by: Rob Herring (Arm) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 2219576 commit 270ddc2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

drivers/spi/spi-qcom-qspi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ static int qcom_qspi_probe(struct platform_device *pdev)
771771
host->prepare_message = qcom_qspi_prepare_message;
772772
host->transfer_one = qcom_qspi_transfer_one;
773773
host->handle_err = qcom_qspi_handle_err;
774-
if (of_property_read_bool(pdev->dev.of_node, "iommus"))
774+
if (of_property_present(pdev->dev.of_node, "iommus"))
775775
host->can_dma = qcom_qspi_can_dma;
776776
host->auto_runtime_pm = true;
777777
host->mem_ops = &qcom_qspi_mem_ops;

drivers/spi/spi-ti-qspi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ static int ti_qspi_probe(struct platform_device *pdev)
824824
}
825825

826826

827-
if (of_property_read_bool(np, "syscon-chipselects")) {
827+
if (of_property_present(np, "syscon-chipselects")) {
828828
qspi->ctrl_base =
829829
syscon_regmap_lookup_by_phandle(np,
830830
"syscon-chipselects");

drivers/spi/spi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2454,7 +2454,7 @@ static int of_spi_parse_dt(struct spi_controller *ctlr, struct spi_device *spi,
24542454
nc, rc);
24552455
return rc;
24562456
}
2457-
if ((of_property_read_bool(nc, "parallel-memories")) &&
2457+
if ((of_property_present(nc, "parallel-memories")) &&
24582458
(!(ctlr->flags & SPI_CONTROLLER_MULTI_CS))) {
24592459
dev_err(&ctlr->dev, "SPI controller doesn't support multi CS\n");
24602460
return -EINVAL;

0 commit comments

Comments
 (0)