* [PATCH] spi: omap2-mcspi: Use of_property_read_bool() for boolean properties
@ 2023-03-10 14:47 Rob Herring
2023-03-11 17:19 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring @ 2023-03-10 14:47 UTC (permalink / raw)
To: Mark Brown; +Cc: devicetree, linux-spi, linux-kernel
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 <robh@kernel.org>
---
drivers/spi/spi-omap2-mcspi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index 6ba9b0d7710b..57ca49e6d9ee 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -1464,7 +1464,7 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
of_property_read_u32(node, "ti,spi-num-cs", &num_cs);
master->num_chipselect = num_cs;
- if (of_get_property(node, "ti,pindir-d0-out-d1-in", NULL))
+ if (of_property_read_bool(node, "ti,pindir-d0-out-d1-in"))
mcspi->pin_dir = MCSPI_PINDIR_D0_OUT_D1_IN;
} else {
pdata = dev_get_platdata(&pdev->dev);
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] spi: omap2-mcspi: Use of_property_read_bool() for boolean properties
2023-03-10 14:47 [PATCH] spi: omap2-mcspi: Use of_property_read_bool() for boolean properties Rob Herring
@ 2023-03-11 17:19 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2023-03-11 17:19 UTC (permalink / raw)
To: Rob Herring; +Cc: devicetree, linux-spi, linux-kernel
On Fri, 10 Mar 2023 08:47:36 -0600, Rob Herring wrote:
> 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().
>
>
Applied to
broonie/spi.git for-next
Thanks!
[1/1] spi: omap2-mcspi: Use of_property_read_bool() for boolean properties
commit: 03adaa404a2c8f9ae0528eb963e86a962a3a2f39
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-11 17:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-10 14:47 [PATCH] spi: omap2-mcspi: Use of_property_read_bool() for boolean properties Rob Herring
2023-03-11 17:19 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).