mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-28 16:56:26 +00:00
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) <robh@kernel.org> Link: https://patch.msgid.link/20241104190759.277184-2-robh@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
2219576883
commit
270ddc2391
@ -771,7 +771,7 @@ static int qcom_qspi_probe(struct platform_device *pdev)
|
||||
host->prepare_message = qcom_qspi_prepare_message;
|
||||
host->transfer_one = qcom_qspi_transfer_one;
|
||||
host->handle_err = qcom_qspi_handle_err;
|
||||
if (of_property_read_bool(pdev->dev.of_node, "iommus"))
|
||||
if (of_property_present(pdev->dev.of_node, "iommus"))
|
||||
host->can_dma = qcom_qspi_can_dma;
|
||||
host->auto_runtime_pm = true;
|
||||
host->mem_ops = &qcom_qspi_mem_ops;
|
||||
|
@ -824,7 +824,7 @@ static int ti_qspi_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
|
||||
if (of_property_read_bool(np, "syscon-chipselects")) {
|
||||
if (of_property_present(np, "syscon-chipselects")) {
|
||||
qspi->ctrl_base =
|
||||
syscon_regmap_lookup_by_phandle(np,
|
||||
"syscon-chipselects");
|
||||
|
@ -2454,7 +2454,7 @@ static int of_spi_parse_dt(struct spi_controller *ctlr, struct spi_device *spi,
|
||||
nc, rc);
|
||||
return rc;
|
||||
}
|
||||
if ((of_property_read_bool(nc, "parallel-memories")) &&
|
||||
if ((of_property_present(nc, "parallel-memories")) &&
|
||||
(!(ctlr->flags & SPI_CONTROLLER_MULTI_CS))) {
|
||||
dev_err(&ctlr->dev, "SPI controller doesn't support multi CS\n");
|
||||
return -EINVAL;
|
||||
|
Loading…
Reference in New Issue
Block a user