projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ae218f7
)
spi: Use of_node_name_eq for node name comparisons
author
Rob Herring
<robh@kernel.org>
Wed, 5 Dec 2018 19:50:41 +0000
(13:50 -0600)
committer
Mark Brown
<broonie@kernel.org>
Thu, 6 Dec 2018 20:15:43 +0000
(20:15 +0000)
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
patch
|
blob
|
history
diff --git
a/drivers/spi/spi.c
b/drivers/spi/spi.c
index 18ebc400249c9886b2f154c32aa84b507a5ff1d7..9a7def7c3237001b10b2abd21851fbdc42fa6d0d 100644
(file)
--- 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;