Skip to content

Commit cb63067

Browse files
avasquez01James Bottomley
authored andcommitted
[SCSI] qla2xxx: Consolidate "qla2xxx" string usage to a #define.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
1 parent 47f5e06 commit cb63067

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

drivers/scsi/qla2xxx/qla_def.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
#include <scsi/scsi_cmnd.h>
3232
#include <scsi/scsi_transport_fc.h>
3333

34+
#define QLA2XXX_DRIVER_NAME "qla2xxx"
35+
3436
/*
3537
* We have MAILBOX_REGISTER_COUNT sized arrays in a few places,
3638
* but that's fine as we don't look at the last 24 ones for

drivers/scsi/qla2xxx/qla_os.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ static int qla2x00_change_queue_type(struct scsi_device *, int);
8686

8787
static struct scsi_host_template qla2x00_driver_template = {
8888
.module = THIS_MODULE,
89-
.name = "qla2xxx",
89+
.name = QLA2XXX_DRIVER_NAME,
9090
.queuecommand = qla2x00_queuecommand,
9191

9292
.eh_abort_handler = qla2xxx_eh_abort,
@@ -115,7 +115,7 @@ static struct scsi_host_template qla2x00_driver_template = {
115115

116116
static struct scsi_host_template qla24xx_driver_template = {
117117
.module = THIS_MODULE,
118-
.name = "qla2xxx",
118+
.name = QLA2XXX_DRIVER_NAME,
119119
.queuecommand = qla24xx_queuecommand,
120120

121121
.eh_abort_handler = qla2xxx_eh_abort,
@@ -1239,7 +1239,7 @@ qla2x00_iospace_config(scsi_qla_host_t *ha)
12391239
goto iospace_error_exit;
12401240
}
12411241

1242-
if (pci_request_regions(ha->pdev, "qla2xxx")) {
1242+
if (pci_request_regions(ha->pdev, QLA2XXX_DRIVER_NAME)) {
12431243
qla_printk(KERN_WARNING, ha,
12441244
"Failed to reserve PIO/MMIO regions (%s)\n",
12451245
pci_name(ha->pdev));
@@ -1355,7 +1355,7 @@ static int qla2x00_probe_one(struct pci_dev *pdev)
13551355
ha->pdev = pdev;
13561356
ha->host = host;
13571357
ha->host_no = host->host_no;
1358-
sprintf(ha->host_str, "qla2xxx_%ld", ha->host_no);
1358+
sprintf(ha->host_str, "%s_%ld", QLA2XXX_DRIVER_NAME, ha->host_no);
13591359

13601360
/* Set ISP-type information. */
13611361
qla2x00_set_isp_flags(ha);
@@ -1538,7 +1538,7 @@ static int qla2x00_probe_one(struct pci_dev *pdev)
15381538
host->transportt = qla2xxx_transport_template;
15391539

15401540
ret = request_irq(pdev->irq, ha->isp_ops.intr_handler,
1541-
SA_INTERRUPT|SA_SHIRQ, "qla2xxx", ha);
1541+
SA_INTERRUPT|SA_SHIRQ, QLA2XXX_DRIVER_NAME, ha);
15421542
if (ret) {
15431543
qla_printk(KERN_WARNING, ha,
15441544
"Failed to reserve interrupt %d already in use.\n",
@@ -1868,7 +1868,8 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha)
18681868
continue;
18691869
}
18701870

1871-
snprintf(name, sizeof(name), "qla2xxx_%ld", ha->host_no);
1871+
snprintf(name, sizeof(name), "%s_%ld", QLA2XXX_DRIVER_NAME,
1872+
ha->host_no);
18721873
ha->s_dma_pool = dma_pool_create(name, &ha->pdev->dev,
18731874
DMA_POOL_SIZE, 8, 0);
18741875
if (ha->s_dma_pool == NULL) {
@@ -2631,7 +2632,7 @@ qla2xxx_remove_one(struct pci_dev *pdev)
26312632
}
26322633

26332634
static struct pci_driver qla2xxx_pci_driver = {
2634-
.name = "qla2xxx",
2635+
.name = QLA2XXX_DRIVER_NAME,
26352636
.driver = {
26362637
.owner = THIS_MODULE,
26372638
},

0 commit comments

Comments
 (0)