Commit 7f8e12f1 authored by Rob Herring's avatar Rob Herring Committed by Martin K. Petersen

scsi: qlogicpti: 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.

As prom_name is not used for anything else, remove it.

Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent df46cac3
...@@ -1314,8 +1314,7 @@ static int qpti_sbus_probe(struct platform_device *op) ...@@ -1314,8 +1314,7 @@ static int qpti_sbus_probe(struct platform_device *op)
qpti->qhost = host; qpti->qhost = host;
qpti->op = op; qpti->op = op;
qpti->qpti_id = nqptis; qpti->qpti_id = nqptis;
strcpy(qpti->prom_name, op->dev.of_node->name); qpti->is_pti = !of_node_name_eq(op->dev.of_node, "QLGC,isp");
qpti->is_pti = strcmp(qpti->prom_name, "QLGC,isp");
if (qpti_map_regs(qpti) < 0) if (qpti_map_regs(qpti) < 0)
goto fail_unlink; goto fail_unlink;
......
...@@ -364,7 +364,6 @@ struct qlogicpti { ...@@ -364,7 +364,6 @@ struct qlogicpti {
int qpti_id; int qpti_id;
int scsi_id; int scsi_id;
int prom_node; int prom_node;
char prom_name[64];
int irq; int irq;
char differential, ultra, clock; char differential, ultra, clock;
unsigned char bursts; unsigned char bursts;
...@@ -379,7 +378,7 @@ struct qlogicpti { ...@@ -379,7 +378,7 @@ struct qlogicpti {
#define SREG_IMASK 0x0c /* Interrupt level */ #define SREG_IMASK 0x0c /* Interrupt level */
#define SREG_SPMASK 0x03 /* Mask for switch pack */ #define SREG_SPMASK 0x03 /* Mask for switch pack */
unsigned char swsreg; unsigned char swsreg;
unsigned int unsigned int
gotirq : 1, /* this instance got an irq */ gotirq : 1, /* this instance got an irq */
is_pti : 1; /* Non-zero if this is a PTI board. */ is_pti : 1; /* Non-zero if this is a PTI board. */
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment