Skip to content

Commit

Permalink
scsi: sun_esp: Use of_node_name_eq for node name comparisons
Browse files Browse the repository at this point in the history
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: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
robherring authored and martinkpetersen committed Dec 8, 2018
1 parent 3beeabd commit 4b66810
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/scsi/sun_esp.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,11 +529,10 @@ static int esp_sbus_probe(struct platform_device *op)
int hme = 0;
int ret;

if (dp->parent &&
(!strcmp(dp->parent->name, "espdma") ||
!strcmp(dp->parent->name, "dma")))
if (of_node_name_eq(dp->parent, "espdma") ||
of_node_name_eq(dp->parent, "dma"))
dma_node = dp->parent;
else if (!strcmp(dp->name, "SUNW,fas")) {
else if (of_node_name_eq(dp, "SUNW,fas")) {
dma_node = op->dev.of_node;
hme = 1;
}
Expand Down

0 comments on commit 4b66810

Please sign in to comment.