Skip to contentSkip to conversation

C99 initializers for drivers/scsi

PATCH New Art Haas 1 participant 1 message Apr 22, 2003

Subsystems (3)
lore
Share & tools
lore

Art Haas

author
#0 lore raw

PATCH 1/1 C99 initializers for drivers/scsi

Hi.

This set of 4 patches convert files to use C99 initializers. The patches are against the current BK.

Art Haas

===== drivers/scsi/aic7xxx_old/aic7xxx.h 1.12 vs edited =====

drivers/scsi/aic7xxx_old/aic7xxx.h +20 -20
@@ -30,26 +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    */\
-	max_sectors: 2048,	/* max physical sectors in 1 cmd */\
-	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,			\
+	.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    */\
+	.max_sectors		= 2048,	/* max physical sectors in 1 cmd */\
+	.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 *));

===== drivers/scsi/sym53c8xx_2/sym53c8xx.h 1.7 vs edited =====

drivers/scsi/sym53c8xx_2/sym53c8xx.h +16 -16
@@ -106,22 +106,22 @@
 #include <scsi/scsicam.h>
 
 #define SYM53C8XX {							\
-	name:			"sym53c8xx",				\
-	detect:			sym53c8xx_detect,			\
-	release:		sym53c8xx_release,			\
-	info:			sym53c8xx_info, 			\
-	queuecommand:		sym53c8xx_queue_command,		\
-	slave_configure:	sym53c8xx_slave_configure,		\
-	eh_abort_handler:	sym53c8xx_eh_abort_handler,		\
-	eh_device_reset_handler:sym53c8xx_eh_device_reset_handler,	\
-	eh_bus_reset_handler:	sym53c8xx_eh_bus_reset_handler,		\
-	eh_host_reset_handler:	sym53c8xx_eh_host_reset_handler,	\
-	can_queue:		0,					\
-	this_id:		7,					\
-	sg_tablesize:		0,					\
-	cmd_per_lun:		0,					\
-	use_clustering:		DISABLE_CLUSTERING,			\
-	highmem_io:		1}
+	.name			= "sym53c8xx",				\
+	.detect			= sym53c8xx_detect,			\
+	.release		= sym53c8xx_release,			\
+	.info			= sym53c8xx_info, 			\
+	.queuecommand		= sym53c8xx_queue_command,		\
+	.slave_configure	= sym53c8xx_slave_configure,		\
+	.eh_abort_handler	= sym53c8xx_eh_abort_handler,		\
+	.eh_device_reset_handler	= sym53c8xx_eh_device_reset_handler,\
+	.eh_bus_reset_handler	= sym53c8xx_eh_bus_reset_handler,	\
+	.eh_host_reset_handler	= sym53c8xx_eh_host_reset_handler,	\
+	.can_queue		= 0,					\
+	.this_id		= 7,					\
+	.sg_tablesize		= 0,					\
+	.cmd_per_lun		= 0,					\
+	.use_clustering		= DISABLE_CLUSTERING,			\
+	.highmem_io		= 1}
 
 #endif /* defined(HOSTS_C) || defined(MODULE) */ 
 

===== drivers/scsi/3w-xxxx.c 1.28 vs edited =====

drivers/scsi/3w-xxxx.c +4 -4
@@ -226,10 +226,10 @@
 
 /* File operations struct for character device */
 static struct file_operations tw_fops = {
-	owner: THIS_MODULE,
-	ioctl: tw_chrdev_ioctl,
-	open: tw_chrdev_open,
-	release: tw_chrdev_release
+	.owner		= THIS_MODULE,
+	.ioctl		= tw_chrdev_ioctl,
+	.open		= tw_chrdev_open,
+	.release	= tw_chrdev_release
 };
 
 /* Globals */

===== drivers/scsi/gdth.c 1.22 vs edited =====

drivers/scsi/gdth.c +3 -3
@@ -747,9 +747,9 @@
 #ifdef GDTH_IOCTL_CHRDEV
 /* ioctl interface */
 static struct file_operations gdth_fops = {
-    ioctl:gdth_ioctl,
-    open:gdth_open,
-    release:gdth_close,
+	.ioctl		= gdth_ioctl,
+	.open		= gdth_open,
+	.release	= gdth_close,
 };
 #endif
 
Signature · 4 lines
To announce that there must be no criticism of the President, or that we
are to stand by the President, right or wrong, is not only unpatriotic
and servile, but is morally treasonable to the American public.
 -- Theodore Roosevelt, Kansas City Star, 1918