Skip to contentSkip to conversation

2.6.0-t3: struct C99 initialiser conversion

PATCH In review CaT 2 participants 3 messages Aug 19, 2003

Subsystems (12)
lore
Share & tools
lore

CaT

author
#0 lore raw

PATCH 6/10 2.6.0-t3: struct C99 initialiser conversion

linux/drivers/ patch

Signature · 3 lines
"How can I not love the Americans? They helped me with a flat tire the
other day," he said.
	- http://tinyurl.com/h6fo
drivers/char/lcd.c +3 -3
diff -aur linux.backup/drivers/char/lcd.c linux/drivers/char/lcd.c
@@ -551,9 +551,9 @@
  */
 
 static struct file_operations lcd_fops = {
-	read:		lcd_read,
-	ioctl:		lcd_ioctl,
-	open:		lcd_open,
+	.read		= lcd_read,
+	.ioctl		= lcd_ioctl,
+	.open		= lcd_open,
 };
 
 static struct miscdevice lcd_dev=
drivers/i2c/i2c-keywest.c +5 -5
diff -aur linux.backup/drivers/i2c/i2c-keywest.c linux/drivers/i2c/i2c-keywest.c
@@ -409,11 +409,11 @@
 
 /* For now, we only handle combined mode (smbus) */
 static struct i2c_algorithm keywest_algorithm = {
-	name:		"Keywest i2c",
-	id:		I2C_ALGO_SMBUS,
-	smbus_xfer:	keywest_smbus_xfer,
-	master_xfer:	keywest_xfer,
-	functionality:	keywest_func,
+	.name		= "Keywest i2c",
+	.id		= I2C_ALGO_SMBUS,
+	.smbus_xfer	= keywest_smbus_xfer,
+	.master_xfer	= keywest_xfer,
+	.functionality	= keywest_func,
 };
 
 
drivers/media/common/saa7146_video.c +31 -31

72 lines not on this page · raw message

drivers/media/dvb/frontends/grundig_29504-401.c +9 -9
diff -aur linux.backup/drivers/media/dvb/frontends/grundig_29504-401.c linux/drivers/media/dvb/frontends/grundig_29504-401.c
@@ -37,15 +37,15 @@
 
 
 struct dvb_frontend_info grundig_29504_401_info = {
-	name: "Grundig 29504-401",
-	type: FE_OFDM,
-/*	frequency_min: ???,*/
-/*	frequency_max: ???,*/
-	frequency_stepsize: 166666,
-/*      frequency_tolerance: ???,*/
-/*      symbol_rate_tolerance: ???,*/
-	notifier_delay: 0,
-	caps: FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 | 
+	.name = "Grundig 29504-401",
+	.type = FE_OFDM,
+/*	.frequency_min = ???,*/
+/*	.frequency_max = ???,*/
+	.frequency_stepsize = 166666,
+/*      .frequency_tolerance = ???,*/
+/*      .symbol_rate_tolerance = ???,*/
+	.notifier_delay = 0,
+	.caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 | 
 	      FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 |
 	      FE_CAN_QPSK | FE_CAN_QAM_16 | FE_CAN_QAM_64 |
 	      FE_CAN_MUTE_TS /*| FE_CAN_CLEAN_SETUP*/
drivers/media/dvb/frontends/ves1820.c +3 -3
diff -aur linux.backup/drivers/media/dvb/frontends/ves1820.c linux/drivers/media/dvb/frontends/ves1820.c
@@ -81,9 +81,9 @@
 	.symbol_rate_min = (XIN/2)/64,     /* SACLK/64 == (XIN/2)/64 */
 	.symbol_rate_max = (XIN/2)/4,      /* SACLK/4 */
 #if 0
-	frequency_tolerance: ???,
-	symbol_rate_tolerance: ???,  /* ppm */  /* == 8% (spec p. 5) */
-	notifier_delay: ?,
+	.frequency_tolerance = ???,
+	.symbol_rate_tolerance = ???,  /* ppm */  /* == 8% (spec p. 5) */
+	.notifier_delay = ?,
 #endif
 	.caps = FE_CAN_QAM_16 | FE_CAN_QAM_32 | FE_CAN_QAM_64 |
 		FE_CAN_QAM_128 | FE_CAN_QAM_256 | 
drivers/media/dvb/ttusb-dec/dec2000_frontend.c +6 -6
diff -aur linux.backup/drivers/media/dvb/ttusb-dec/dec2000_frontend.c linux/drivers/media/dvb/ttusb-dec/dec2000_frontend.c
@@ -30,12 +30,12 @@
 #define dprintk	if (debug) printk
 
 static struct dvb_frontend_info dec2000_frontend_info = {
-	name:			"TechnoTrend/Hauppauge DEC-2000-t Frontend",
-	type:			FE_OFDM,
-	frequency_min:		51000000,
-	frequency_max:		858000000,
-	frequency_stepsize:	62500,
-	caps:	FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
+	.name			= "TechnoTrend/Hauppauge DEC-2000-t Frontend",
+	.type			= FE_OFDM,
+	.frequency_min		= 51000000,
+	.frequency_max		= 858000000,
+	.frequency_stepsize	= 62500,
+	.caps =	FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
 		FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
 		FE_CAN_QAM_16 | FE_CAN_QAM_64 | FE_CAN_QAM_AUTO |
 		FE_CAN_TRANSMISSION_MODE_AUTO | FE_CAN_GUARD_INTERVAL_AUTO |
drivers/media/dvb/ttusb-dec/ttusb_dec.c +4 -4
diff -aur linux.backup/drivers/media/dvb/ttusb-dec/ttusb_dec.c linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c
@@ -1003,10 +1003,10 @@
 };
 
 static struct usb_driver ttusb_dec_driver = {
-      name:		DRIVER_NAME,
-      probe:		ttusb_dec_probe,
-      disconnect:	ttusb_dec_disconnect,
-      id_table:		ttusb_dec_table,
+      .name		= DRIVER_NAME,
+      .probe		= ttusb_dec_probe,
+      .disconnect	= ttusb_dec_disconnect,
+      .id_table		= ttusb_dec_table,
 };
 
 static int __init ttusb_dec_init(void)
drivers/media/video/bttv-cards.c +2 -2
diff -aur linux.backup/drivers/media/video/bttv-cards.c linux/drivers/media/video/bttv-cards.c
@@ -1298,7 +1298,7 @@
 },{
         .name           = "Powercolor MTV878/ MTV878R/ MTV878F",
         .video_inputs   = 3,
-        audio_inputs:   2, 
+        .audio_inputs   = 2,
 	.tuner		= 0,
         .svhs           = 2,
         .gpiomask       = 0x1C800F,  // Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset
@@ -1338,7 +1338,7 @@
 },{
         .name           = "Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF",
         .video_inputs   = 4,
-        audio_inputs:   3, 
+        .audio_inputs   = 3,
         .tuner          = 0,
         .svhs           = 2,
         .gpiomask       = 7,
drivers/mtd/devices/blkmtd.c +2 -2
diff -aur linux.backup/drivers/mtd/devices/blkmtd.c linux/drivers/mtd/devices/blkmtd.c
@@ -289,8 +289,8 @@
 
                     
 static struct address_space_operations blkmtd_aops = {
-  writepage:     blkmtd_writepage,
-  readpage:      NULL,
+  .writepage     = blkmtd_writepage,
+  .readpage      = NULL,
 }; 
 
 
drivers/mtd/maps/ceiva.c +12 -12
diff -aur linux.backup/drivers/mtd/maps/ceiva.c linux/drivers/mtd/maps/ceiva.c
@@ -64,23 +64,23 @@
 
 static struct mtd_partition ceiva_partitions[] = {
 	{
-		name: "Ceiva BOOT partition",
-		size:   BOOT_PARTITION_SIZE_KiB*1024,
-		offset: 0,
+		.name = "Ceiva BOOT partition",
+		.size   = BOOT_PARTITION_SIZE_KiB*1024,
+		.offset = 0,
 
 	},{
-		name: "Ceiva parameters partition",
-		size:   PARAMS_PARTITION_SIZE_KiB*1024,
-		offset: (16 + 8) * 1024,
+		.name = "Ceiva parameters partition",
+		.size   = PARAMS_PARTITION_SIZE_KiB*1024,
+		.offset = (16 + 8) * 1024,
 	},{
-		name: "Ceiva kernel partition",
-		size: (KERNEL_PARTITION_SIZE_KiB)*1024,
-		offset: 0x20000,
+		.name = "Ceiva kernel partition",
+		.size = (KERNEL_PARTITION_SIZE_KiB)*1024,
+		.offset = 0x20000,
 
 	},{
-		name: "Ceiva root filesystem partition",
-		offset: MTDPART_OFS_APPEND,
-		size: (ROOT_PARTITION_SIZE_KiB)*1024,
+		.name = "Ceiva root filesystem partition",
+		.offset = MTDPART_OFS_APPEND,
+		.size = (ROOT_PARTITION_SIZE_KiB)*1024,
 	}
 };
 #endif
drivers/mtd/nand/autcpu12.c +24 -24

63 lines not on this page · raw message

drivers/mtd/nand/edb7312.c +3 -3
diff -aur linux.backup/drivers/mtd/nand/edb7312.c linux/drivers/mtd/nand/edb7312.c
@@ -71,9 +71,9 @@
  * Define static partitions for flash device
  */
 static struct mtd_partition partition_info[] = {
-	{ name: "EP7312 Nand Flash",
-		  offset: 0,
-		  size: 8*1024*1024 }
+	{ .name = "EP7312 Nand Flash",
+		  .offset = 0,
+		  .size = 8*1024*1024 }
 };
 #define NUM_PARTITIONS 1
 
drivers/net/amd8111e.c +6 -6
diff -aur linux.backup/drivers/net/amd8111e.c linux/drivers/net/amd8111e.c
@@ -1940,12 +1940,12 @@
 }
 
 static struct pci_driver amd8111e_driver = {
-	name:		MODULE_NAME,
-	id_table:	amd8111e_pci_tbl,
-	probe:		amd8111e_probe_one,
-	remove:		__devexit_p(amd8111e_remove_one),
-	suspend:	amd8111e_suspend,
-	resume:		amd8111e_resume
+	.name		= MODULE_NAME,
+	.id_table	= amd8111e_pci_tbl,
+	.probe		= amd8111e_probe_one,
+	.remove		= __devexit_p(amd8111e_remove_one),
+	.suspend	= amd8111e_suspend,
+	.resume		= amd8111e_resume
 };
 
 static int __init amd8111e_init(void)
drivers/net/arm/ether00.c +3 -3
diff -aur linux.backup/drivers/net/arm/ether00.c linux/drivers/net/arm/ether00.c
@@ -991,9 +991,9 @@
 }
 
 static struct pld_hotswap_ops ether00_pldhs_ops={
-	name: ETHER00_NAME,
-	add_device: ether00_add_device,
-	remove_devices: ether00_remove_devices,
+	.name = ETHER00_NAME,
+	.add_device = ether00_add_device,
+	.remove_devices = ether00_remove_devices,
 };
 
 
drivers/net/irda/via-ircc.c +4 -4
diff -aur linux.backup/drivers/net/irda/via-ircc.c linux/drivers/net/irda/via-ircc.c
@@ -134,10 +134,10 @@
 
 
 static struct pci_driver via_driver = {
-	name:		VIA_MODULE_NAME,
-	id_table:	via_pci_tbl,
-	probe:		via_init_one,
-	remove:		via_remove_one,
+	.name		= VIA_MODULE_NAME,
+	.id_table	= via_pci_tbl,
+	.probe		= via_init_one,
+	.remove		= via_remove_one,
 };
 
 
drivers/net/sungem_phy.c +92 -92

244 lines not on this page · raw message

drivers/s390/net/qeth.c +8 -8
diff -aur linux.backup/drivers/s390/net/qeth.c linux/drivers/s390/net/qeth.c
@@ -9765,19 +9765,19 @@
 };
 
 static struct file_operations qeth_procfile_fops = {
-	ioctl:qeth_procfile_ioctl,
-	read:qeth_procfile_read,
-	open:qeth_procfile_open,
-	release:qeth_procfile_release,
+	.ioctl = qeth_procfile_ioctl,
+	.read = qeth_procfile_read,
+	.open = qeth_procfile_open,
+	.release = qeth_procfile_release,
 };
 
 static struct proc_dir_entry *qeth_proc_file;
 
 static struct file_operations qeth_ipato_procfile_fops = {
-	read:qeth_procfile_read,	/* same as above! */
-	write:qeth_ipato_procfile_write,
-	open:qeth_ipato_procfile_open,
-	release:qeth_procfile_release	/* same as above! */
+	.read = qeth_procfile_read,	/* same as above! */
+	.write = qeth_ipato_procfile_write,
+	.open = qeth_ipato_procfile_open,
+	.release = qeth_procfile_release	/* same as above! */
 };
 
 static struct proc_dir_entry *qeth_ipato_proc_file;
drivers/scsi/aic7xxx/aic79xx_osm_pci.c +4 -4
diff -aur linux.backup/drivers/scsi/aic7xxx/aic79xx_osm_pci.c linux/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
@@ -72,10 +72,10 @@
 MODULE_DEVICE_TABLE(pci, ahd_linux_pci_id_table);
 
 struct pci_driver aic79xx_pci_driver = {
-	name:		"aic79xx",
-	probe:		ahd_linux_pci_dev_probe,
-	remove:		ahd_linux_pci_dev_remove,
-	id_table:	ahd_linux_pci_id_table
+	.name		= "aic79xx",
+	.probe		= ahd_linux_pci_dev_probe,
+	.remove		= ahd_linux_pci_dev_remove,
+	.id_table	= ahd_linux_pci_id_table
 };
 
 static void
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c +4 -4
diff -aur linux.backup/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c linux/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
@@ -75,10 +75,10 @@
 MODULE_DEVICE_TABLE(pci, ahc_linux_pci_id_table);
 
 struct pci_driver aic7xxx_pci_driver = {
-	name:		"aic7xxx",
-	probe:		ahc_linux_pci_dev_probe,
-	remove:		ahc_linux_pci_dev_remove,
-	id_table:	ahc_linux_pci_id_table
+	.name		= "aic7xxx",
+	.probe		= ahc_linux_pci_dev_probe,
+	.remove		= ahc_linux_pci_dev_remove,
+	.id_table	= ahc_linux_pci_id_table
 };
 
 static void
drivers/usb/host/hc_sl811_rh.c +1 -1
diff -aur linux.backup/drivers/usb/host/hc_sl811_rh.c linux/drivers/usb/host/hc_sl811_rh.c
@@ -329,7 +329,7 @@
 	switch (bmRType_bReq) {
 		/* Request Destination:
 		   without flags: Device, 
-		   RH_INTERFACE: interface, 
+		   RH_INTERFACE: interface,
 		   RH_ENDPOINT: endpoint,
 		   RH_CLASS means HUB here, 
 		   RH_OTHER | RH_CLASS  almost ever means HUB_PORT here 
drivers/video/68328fb.c +6 -6
diff -aur linux.backup/drivers/video/68328fb.c linux/drivers/video/68328fb.c
@@ -401,12 +401,12 @@
                                               ((1<<(width))-1)) : 0))
 
 static struct fb_ops mc68328_fb_ops = {
-	.owner:		THIS_MODULE,
-	.fb_setcolreg:	mc68328fb_setcolreg,
-	.fb_fillrect:	cfbfillrect,
-	.fb_copyarea:	cfbcopyarea,
-	.fb_imageblit:	cfbimgblt,
-	.fb_cursor:	softcursor,
+	.owner		= THIS_MODULE,
+	.fb_setcolreg	= mc68328fb_setcolreg,
+	.fb_fillrect	= cfbfillrect,
+	.fb_copyarea	= cfbcopyarea,
+	.fb_imageblit	= cfbimgblt,
+	.fb_cursor	= softcursor,
 };
 
 
drivers/video/riva/fbdev.c +29 -29

73 lines not on this page · raw message

drivers/video/sis/sis_accel.c +24 -24

62 lines not on this page · raw message

drivers/video/sis/sis_main.c +9 -9
diff -aur linux.backup/drivers/video/sis/sis_main.c linux/drivers/video/sis/sis_main.c
@@ -2033,17 +2033,17 @@
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
 static struct fb_ops sisfb_ops = {
-	owner:		THIS_MODULE,
-	fb_get_fix:	sisfb_get_fix,
-	fb_get_var:	sisfb_get_var,
-	fb_set_var:	sisfb_set_var,
-	fb_get_cmap:	sisfb_get_cmap,
-	fb_set_cmap:	sisfb_set_cmap,
+	.owner		= THIS_MODULE,
+	.fb_get_fix	= sisfb_get_fix,
+	.fb_get_var	= sisfb_get_var,
+	.fb_set_var	= sisfb_set_var,
+	.fb_get_cmap	= sisfb_get_cmap,
+	.fb_set_cmap	= sisfb_set_cmap,
 #ifdef SISFB_PAN
-        fb_pan_display:	sisfb_pan_display,
+        .fb_pan_display	= sisfb_pan_display,
 #endif
-	fb_ioctl:	sisfb_ioctl,
-	fb_mmap:	sisfb_mmap,
+	.fb_ioctl	= sisfb_ioctl,
+	.fb_mmap	= sisfb_mmap,
 };
 #endif
 
#1 lore raw

drivers/usb/host/hc_sl811_rh.c line 335

Quoted 12 lines · CaT

diff -aur linux.backup/drivers/usb/host/hc_sl811_rh.c linux/drivers/usb/host/hc_sl811_rh.c

drivers/usb/host/hc_sl811_rh.c +1 -1
@@ -329,7 +329,7 @@
 	switch (bmRType_bReq) {
 		/* Request Destination:
 		   without flags: Device, 
-		   RH_INTERFACE: interface, 
+		   RH_INTERFACE: interface,
 		   RH_ENDPOINT: endpoint,
 		   RH_CLASS means HUB here, 
 		   RH_OTHER | RH_CLASS  almost ever means HUB_PORT here 

I think you need to work on your scripts if you thought this was a C99 "fix". More like a "delete trailing space" patch...

thanks,

greg k-h

author
#2 lore raw
Quoted 13 lines · Greg KH

drivers/usb/host/hc_sl811_rh.c line 335

Quoted 9 lines · CaT
drivers/usb/host/hc_sl811_rh.c +1 -1
@@ -329,7 +329,7 @@
 	switch (bmRType_bReq) {
 		/* Request Destination:
 		   without flags: Device, 
-		   RH_INTERFACE: interface, 
+		   RH_INTERFACE: interface,
 		   RH_ENDPOINT: endpoint,
 		   RH_CLASS means HUB here, 
 		   RH_OTHER | RH_CLASS  almost ever means HUB_PORT here 

I think you need to work on your scripts if you thought this was a C99 "fix". More like a "delete trailing space" patch...

That it is. I was aware of it but I didn't think leaving it there would hurt... But I'll take it out of the -bk6 patch.

Signature · 3 lines
"How can I not love the Americans? They helped me with a flat tire the
other day," he said.
	- http://tinyurl.com/h6fo