devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] SPI: Use of_node_name_eq for node name comparisons
@ 2018-12-05 19:50 Rob Herring
  2018-12-06 20:26 ` Applied "spi: Use of_node_name_eq for node name comparisons" to the spi tree Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring @ 2018-12-05 19:50 UTC (permalink / raw)
  To: devicetree, linux-kernel; +Cc: Mark Brown, linux-spi

Convert string compares of DT node names to use of_node_name_eq helper
instead. This removes direct access to the node name pointer.

Cc: Mark Brown <broonie@kernel.org>
Cc: linux-spi@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
 drivers/spi/spi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 6ca59406b0b7..d27b6b0dee43 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -1644,7 +1644,7 @@ static int of_spi_parse_dt(struct spi_controller *ctlr, struct spi_device *spi,
 	}
 
 	if (spi_controller_is_slave(ctlr)) {
-		if (strcmp(nc->name, "slave")) {
+		if (!of_node_name_eq(nc, "slave")) {
 			dev_err(&ctlr->dev, "%pOF is not called 'slave'\n",
 				nc);
 			return -EINVAL;
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Applied "spi: Use of_node_name_eq for node name comparisons" to the spi tree
  2018-12-05 19:50 [PATCH] SPI: Use of_node_name_eq for node name comparisons Rob Herring
@ 2018-12-06 20:26 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2018-12-06 20:26 UTC (permalink / raw)
  To: Rob Herring; +Cc: Mark Brown, devicetree, linux-kernel

The patch

   spi: Use of_node_name_eq for node name comparisons

has been applied to the spi tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git 

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

>From 194276b073a10f04b420484bd81fa4dbb3ae0e1e Mon Sep 17 00:00:00 2001
From: Rob Herring <robh@kernel.org>
Date: Wed, 5 Dec 2018 13:50:41 -0600
Subject: [PATCH] spi: Use of_node_name_eq for node name comparisons

Convert string compares of DT node names to use of_node_name_eq helper
instead. This removes direct access to the node name pointer.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/spi/spi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 18ebc400249c..9a7def7c3237 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -1666,7 +1666,7 @@ static int of_spi_parse_dt(struct spi_controller *ctlr, struct spi_device *spi,
 	}
 
 	if (spi_controller_is_slave(ctlr)) {
-		if (strcmp(nc->name, "slave")) {
+		if (!of_node_name_eq(nc, "slave")) {
 			dev_err(&ctlr->dev, "%pOF is not called 'slave'\n",
 				nc);
 			return -EINVAL;
-- 
2.19.0.rc2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-12-06 20:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-05 19:50 [PATCH] SPI: Use of_node_name_eq for node name comparisons Rob Herring
2018-12-06 20:26 ` Applied "spi: Use of_node_name_eq for node name comparisons" to the spi tree 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).