2002-12-16 07:58:33

by Zwane Mwaikambo

[permalink] [raw]
Subject: [patch][2.5] fix NULL Scsi_Host_Template.name entry + C99 initializers for aic7xxx

Initializes the ->name member and switches the struct over to C99
initializers whilst i'm there.

Please apply

Index: linux-2.5.52/drivers/scsi/aic7xxx/aic7xxx_linux_host.h
===================================================================
RCS file: /build/cvsroot/linux-2.5.52/drivers/scsi/aic7xxx/aic7xxx_linux_host.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 aic7xxx_linux_host.h
--- linux-2.5.52/drivers/scsi/aic7xxx/aic7xxx_linux_host.h 16 Dec 2002 05:16:13 -0000 1.1.1.1
+++ linux-2.5.52/drivers/scsi/aic7xxx/aic7xxx_linux_host.h 16 Dec 2002 07:57:13 -0000
@@ -64,24 +64,25 @@
* to do with card config are filled in after the card is detected.
*/
#define AIC7XXX { \
- proc_info: ahc_linux_proc_info, \
- detect: ahc_linux_detect, \
- release: ahc_linux_release, \
- info: ahc_linux_info, \
- queuecommand: ahc_linux_queue, \
- eh_abort_handler: ahc_linux_abort, \
- eh_device_reset_handler: ahc_linux_dev_reset, \
- eh_bus_reset_handler: ahc_linux_bus_reset, \
- slave_configure: ahc_linux_slave_configure, \
- bios_param: AIC7XXX_BIOSPARAM, \
- can_queue: 253, /* max simultaneous cmds */\
- this_id: -1, /* scsi id of host adapter */\
- sg_tablesize: 0, /* max scatter-gather cmds */\
- cmd_per_lun: 2, /* cmds per lun */\
- present: 0, /* number of 7xxx's present */\
- unchecked_isa_dma: 0, /* no memory DMA restrictions */\
- use_clustering: ENABLE_CLUSTERING, \
- highmem_io: 1 \
+ .name = "aic7xxx", \
+ .proc_info = ahc_linux_proc_info, \
+ .detect = ahc_linux_detect, \
+ .release = ahc_linux_release, \
+ .info = ahc_linux_info, \
+ .queuecommand = ahc_linux_queue, \
+ .eh_abort_handler = ahc_linux_abort, \
+ .eh_device_reset_handler = ahc_linux_dev_reset, \
+ .eh_bus_reset_handler = ahc_linux_bus_reset, \
+ .slave_configure = ahc_linux_slave_configure, \
+ .bios_param = AIC7XXX_BIOSPARAM, \
+ .can_queue = 253, /* max simultaneous cmds */\
+ .this_id = -1, /* scsi id of host adapter */\
+ .sg_tablesize = 0, /* max scatter-gather cmds */\
+ .cmd_per_lun = 2, /* cmds per lun */\
+ .present = 0, /* number of 7xxx's present */\
+ .unchecked_isa_dma = 0, /* no memory DMA restrictions */\
+ .use_clustering = ENABLE_CLUSTERING, \
+ .highmem_io = 1 \
}

#endif /* _AIC7XXX_LINUX_HOST_H_ */
Index: linux-2.5.52/drivers/scsi/aic7xxx_old/aic7xxx.h
===================================================================
RCS file: /build/cvsroot/linux-2.5.52/drivers/scsi/aic7xxx_old/aic7xxx.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 aic7xxx.h
--- linux-2.5.52/drivers/scsi/aic7xxx_old/aic7xxx.h 16 Dec 2002 05:16:13 -0000 1.1.1.1
+++ linux-2.5.52/drivers/scsi/aic7xxx_old/aic7xxx.h 16 Dec 2002 07:52:15 -0000
@@ -30,25 +30,26 @@
* to do with card config are filled in after the card is detected.
*/
#define AIC7XXX { \
- proc_info: aic7xxx_proc_info, \
- detect: aic7xxx_detect, \
- release: aic7xxx_release, \
- info: aic7xxx_info, \
- queuecommand: aic7xxx_queue, \
- slave_alloc: aic7xxx_slave_alloc, \
- slave_configure: aic7xxx_slave_configure, \
- slave_destroy: aic7xxx_slave_destroy, \
- bios_param: aic7xxx_biosparam, \
- eh_abort_handler: aic7xxx_abort, \
- eh_device_reset_handler: aic7xxx_bus_device_reset, \
- eh_host_reset_handler: aic7xxx_reset, \
- can_queue: 255, /* max simultaneous cmds */\
- this_id: -1, /* scsi id of host adapter */\
- sg_tablesize: 0, /* max scatter-gather cmds */\
- cmd_per_lun: 3, /* cmds per lun (linked cmds) */\
- present: 0, /* number of 7xxx's present */\
- unchecked_isa_dma: 0, /* no memory DMA restrictions */\
- use_clustering: ENABLE_CLUSTERING, \
+ .name = "aic7xxx_old", \
+ .proc_info = aic7xxx_proc_info, \
+ .detect = aic7xxx_detect, \
+ .release = aic7xxx_release, \
+ .info = aic7xxx_info, \
+ .queuecommand = aic7xxx_queue, \
+ .slave_alloc = aic7xxx_slave_alloc, \
+ .slave_configure = aic7xxx_slave_configure, \
+ .slave_destroy = aic7xxx_slave_destroy, \
+ .bios_param = aic7xxx_biosparam, \
+ .eh_abort_handler = aic7xxx_abort, \
+ .eh_device_reset_handler = aic7xxx_bus_device_reset, \
+ .eh_host_reset_handler = aic7xxx_reset, \
+ .can_queue = 255, /* max simultaneous cmds */\
+ .this_id = -1, /* scsi id of host adapter */\
+ .sg_tablesize = 0, /* max scatter-gather cmds */\
+ .cmd_per_lun = 3, /* cmds per lun (linked cmds) */\
+ .present = 0, /* number of 7xxx's present */\
+ .unchecked_isa_dma = 0, /* no memory DMA restrictions */\
+ .use_clustering = ENABLE_CLUSTERING, \
}

extern int aic7xxx_queue(Scsi_Cmnd *, void (*)(Scsi_Cmnd *));
--
function.linuxpower.ca