@@ -8707,7 +8707,7 @@ static int sdebug_init_cmd_priv(struct Scsi_Host *shost, struct scsi_cmnd *cmd)
8707
8707
return 0 ;
8708
8708
}
8709
8709
8710
- static struct scsi_host_template sdebug_driver_template = {
8710
+ static const struct scsi_host_template sdebug_driver_template = {
8711
8711
.show_info = scsi_debug_show_info ,
8712
8712
.write_info = scsi_debug_write_info ,
8713
8713
.proc_name = sdebug_proc_name ,
@@ -8750,17 +8750,17 @@ static int sdebug_driver_probe(struct device *dev)
8750
8750
8751
8751
sdbg_host = dev_to_sdebug_host (dev );
8752
8752
8753
- sdebug_driver_template .can_queue = sdebug_max_queue ;
8754
- sdebug_driver_template .cmd_per_lun = sdebug_max_queue ;
8755
- if (!sdebug_clustering )
8756
- sdebug_driver_template .dma_boundary = PAGE_SIZE - 1 ;
8757
-
8758
8753
hpnt = scsi_host_alloc (& sdebug_driver_template , 0 );
8759
8754
if (NULL == hpnt ) {
8760
8755
pr_err ("scsi_host_alloc failed\n" );
8761
8756
error = - ENODEV ;
8762
8757
return error ;
8763
8758
}
8759
+ hpnt -> can_queue = sdebug_max_queue ;
8760
+ hpnt -> cmd_per_lun = sdebug_max_queue ;
8761
+ if (!sdebug_clustering )
8762
+ hpnt -> dma_boundary = PAGE_SIZE - 1 ;
8763
+
8764
8764
if (submit_queues > nr_cpu_ids ) {
8765
8765
pr_warn ("%s: trim submit_queues (was %d) to nr_cpu_ids=%u\n" ,
8766
8766
my_name , submit_queues , nr_cpu_ids );
0 commit comments