qlogic: set host name before using scsi_host_alloc()
PATCH 3/3 qlogic: set host name before using scsi_host_alloc()
Signature · 2 lines
-- aris
drivers/scsi/qlogicfas.c renamed from drivers/scsi/qlogicfas.c.orig +5 -4
@@ -668,6 +668,11 @@ } elseprintk (KERN_INFO "Ql: Using preset IRQ %d\n" , qlirq);#endif +sprintf (qinfo, +"Qlogicfas Driver version 0.46, chip %02X at %03X, IRQ %d, TPdma:%d" , + qltyp, qbase, qlirq,QL_TURBO_PDMA ); + host->name = qinfo; + hreg =scsi_host_alloc (host,0 );/* no host data */ if (!hreg) goto err_release_mem;
@@ -678,10 +683,6 @@ hreg->can_queue =1 ;INIT_LIST_HEAD (&hreg->sht_legacy_list); -sprintf (qinfo, -"Qlogicfas Driver version 0.46, chip %02X at %03X, IRQ %d, TPdma:%d" , - qltyp, qbase, qlirq,QL_TURBO_PDMA ); - host->name = qinfo;#ifdef QL_USE_IRQ if (qlirq <0 ||request_irq (qlirq, do_ql_ihandl,0 ,"qlogicfas" , hreg)) goto free_scsi_host;
drivers/scsi/qlogicfas.c line 675
Quoted 5 lines
drivers/scsi/qlogicfas.c renamed from drivers/scsi/qlogicfas.c.orig +5
-0+sprintf (qinfo, +"Qlogicfas Driver version 0.46, chip %02X at %03X, IRQ %d, TPdma:%d" , + qltyp, qbase, qlirq,QL_TURBO_PDMA ); + host->name = qinfo; +
This should be
.name = "qlogicfas",
in the host template defintion instead, that makes the text const and has no runtime overhead.