summaryrefslogtreecommitdiff
path: root/drivers/spi/spi.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2018-12-05 22:50:41 +0300
committerMark Brown <broonie@kernel.org>2018-12-06 23:15:43 +0300
commit194276b073a10f04b420484bd81fa4dbb3ae0e1e (patch)
tree945eae48eb6b140c2b6364a0ae7db6b3a1463ca0 /drivers/spi/spi.c
parentae218f7847fcf32e75ba82b1f3ab01fe53731d7a (diff)
downloadlinux-194276b073a10f04b420484bd81fa4dbb3ae0e1e.tar.xz
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>
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r--drivers/spi/spi.c2
1 files changed, 1 insertions, 1 deletions
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;