Skip to contentSkip to conversation

C99 designated initializers for drivers/ide/pci (2 of 2)

PATCH In review Art Haas 2 participants 2 messages Nov 11, 2002

lore
Share & tools
lore

Art Haas

author
#0 lore raw

PATCH 1/1 C99 designated initializers for drivers/ide/pci (2 of 2)

Hi.

Here's the second patch for drivers/ide/pci that switch the header files (and two lines in serverworks.c) to use C99 designated initializers. The patches are against 2.5.47.

This mail holds patches for files starting with the letters [o-z].

Art Haas

drivers/ide/pci/opti621.h renamed from drivers/ide/pci/opti621.h.old +30 -30
@@ -11,38 +11,38 @@
 
 static ide_pci_device_t opti621_chipsets[] __devinitdata = {
 	{	/* 0 */
-		vendor:		PCI_VENDOR_ID_OPTI,
-		device:		PCI_DEVICE_ID_OPTI_82C621,
-		name:		"OPTI621",
-		init_setup:	init_setup_opti621,
-		init_chipset:	NULL,
-		init_iops:	NULL,
-		init_hwif:	init_hwif_opti621,
-		init_dma:	init_dma_opti621,
-		channels:	2,
-		autodma:	AUTODMA,
-		enablebits:	{{0x45,0x80,0x00}, {0x40,0x08,0x00}},
-		bootable:	ON_BOARD,
-		extra:		0,
+		.vendor		= PCI_VENDOR_ID_OPTI,
+		.device		= PCI_DEVICE_ID_OPTI_82C621,
+		.name		= "OPTI621",
+		.init_setup	= init_setup_opti621,
+		.init_chipset	= NULL,
+		.init_iops	= NULL,
+		.init_hwif	= init_hwif_opti621,
+		.init_dma	= init_dma_opti621,
+		.channels	= 2,
+		.autodma	= AUTODMA,
+		.enablebits	= {{0x45,0x80,0x00}, {0x40,0x08,0x00}},
+		.bootable	= ON_BOARD,
+		.extra		= 0,
 	},{	/* 1 */
-		vendor:		PCI_VENDOR_ID_OPTI,
-		device:		PCI_DEVICE_ID_OPTI_82C825,
-		name:		"OPTI621X",
-		init_setup:	init_setup_opti621,
-		init_chipset:	NULL,
-		init_iops:	NULL,
-		init_hwif:	init_hwif_opti621,
-                init_dma:	init_dma_opti621,
-		channels:	2,
-		autodma:	AUTODMA,
-		enablebits:	{{0x45,0x80,0x00}, {0x40,0x08,0x00}},
-		bootable:	ON_BOARD,
-		extra:		0,
+		.vendor		= PCI_VENDOR_ID_OPTI,
+		.device		= PCI_DEVICE_ID_OPTI_82C825,
+		.name		= "OPTI621X",
+		.init_setup	= init_setup_opti621,
+		.init_chipset	= NULL,
+		.init_iops	= NULL,
+		.init_hwif	= init_hwif_opti621,
+                .init_dma	= init_dma_opti621,
+		.channels	= 2,
+		.autodma	= AUTODMA,
+		.enablebits	= {{0x45,0x80,0x00}, {0x40,0x08,0x00}},
+		.bootable	= ON_BOARD,
+		.extra		= 0,
 	},{
-		vendor:		0,
-		device:		0,
-		channels:	0,
-		bootable:	EOL,
+		.vendor		= 0,
+		.device		= 0,
+		.channels	= 0,
+		.bootable	= EOL,
 	}
 };
 
drivers/ide/pci/pdc202xx_new.h renamed from drivers/ide/pci/pdc202xx_new.h.old +101 -101

227 lines not on this page · raw message

drivers/ide/pci/pdc202xx_old.h renamed from drivers/ide/pci/pdc202xx_old.h.old +77 -77

186 lines not on this page · raw message

drivers/ide/pci/pdcadma.h renamed from drivers/ide/pci/pdcadma.h.old +21 -21

55 lines not on this page · raw message

drivers/ide/pci/piix.h renamed from drivers/ide/pci/piix.h.old +217 -217

462 lines not on this page · raw message

drivers/ide/pci/rz1000.h renamed from drivers/ide/pci/rz1000.h.old +28 -28

64 lines not on this page · raw message

drivers/ide/pci/serverworks.c renamed from drivers/ide/pci/serverworks.c.old +2 -2
@@ -801,8 +801,8 @@
 	.id_table	= svwks_pci_tbl,
 	.probe		= svwks_init_one,
 #if 0	/* FIXME: implement */
-	suspend:	,
-	resume:		,
+	.suspend	= ,
+	.resume		= ,
 #endif
 };
 
drivers/ide/pci/serverworks.h renamed from drivers/ide/pci/serverworks.h.old +60 -60

136 lines not on this page · raw message

drivers/ide/pci/siimage.h renamed from drivers/ide/pci/siimage.h.old +32 -32

78 lines not on this page · raw message

drivers/ide/pci/sis5513.h renamed from drivers/ide/pci/sis5513.h.old +20 -20
@@ -17,10 +17,10 @@
 
 static ide_pci_host_proc_t sis_procs[] __initdata = {
 {
-		name:		"sis",
-		set:		1,
-		get_info:	sis_get_info,
-		parent:		NULL,
+		.name		= "sis",
+		.set		= 1,
+		.get_info	= sis_get_info,
+		.parent		= NULL,
 	},
 };
 #endif /* defined(DISPLAY_SIS_TIMINGS) && defined(CONFIG_PROC_FS) */
@@ -31,23 +31,23 @@
 
 static ide_pci_device_t sis5513_chipsets[] __devinitdata = {
 	{	/* 0 */
-		vendor:		PCI_VENDOR_ID_SI,
-		device:		PCI_DEVICE_ID_SI_5513,
-		name:		"SIS5513",
-		init_chipset:	init_chipset_sis5513,
-		init_iops:	NULL,
-		init_hwif:	init_hwif_sis5513,
-		init_dma:	init_dma_sis5513,
-		channels:	2,
-		autodma:	NOAUTODMA,
-		enablebits:	{{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
-		bootable:	ON_BOARD,
-		extra:		0
+		.vendor		= PCI_VENDOR_ID_SI,
+		.device		= PCI_DEVICE_ID_SI_5513,
+		.name		= "SIS5513",
+		.init_chipset	= init_chipset_sis5513,
+		.init_iops	= NULL,
+		.init_hwif	= init_hwif_sis5513,
+		.init_dma	= init_dma_sis5513,
+		.channels	= 2,
+		.autodma	= NOAUTODMA,
+		.enablebits	= {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
+		.bootable	= ON_BOARD,
+		.extra		= 0
 	},{
-		vendor:		0,
-		device:		0,
-		channels:	0,
-		bootable:	EOL,
+		.vendor		= 0,
+		.device		= 0,
+		.channels	= 0,
+		.bootable	= EOL,
 	}
 };
 
drivers/ide/pci/sl82c105.h renamed from drivers/ide/pci/sl82c105.h.old +16 -16
@@ -11,23 +11,23 @@
 
 static ide_pci_device_t sl82c105_chipsets[] __devinitdata = {
 	{	/* 0 */
-		vendor:		PCI_VENDOR_ID_WINBOND,
-		device:		PCI_DEVICE_ID_WINBOND_82C105,
-		name:		"W82C105",
-		init_chipset:	init_chipset_sl82c105,
-		init_iops:	NULL,
-		init_hwif:	init_hwif_sl82c105,
-		init_dma:	init_dma_sl82c105,
-		channels:	2,
-		autodma:	NOAUTODMA,
-		enablebits:	{{0x40,0x01,0x01}, {0x40,0x10,0x10}},
-		bootable:	ON_BOARD,
-		extra:		0,
+		.vendor		= PCI_VENDOR_ID_WINBOND,
+		.device		= PCI_DEVICE_ID_WINBOND_82C105,
+		.name		= "W82C105",
+		.init_chipset	= init_chipset_sl82c105,
+		.init_iops	= NULL,
+		.init_hwif	= init_hwif_sl82c105,
+		.init_dma	= init_dma_sl82c105,
+		.channels	= 2,
+		.autodma	= NOAUTODMA,
+		.enablebits	= {{0x40,0x01,0x01}, {0x40,0x10,0x10}},
+		.bootable	= ON_BOARD,
+		.extra		= 0,
 	},{
-		vendor:		0,
-		device:		0,
-		channels:	0,
-		bootable:	EOL,
+		.vendor		= 0,
+		.device		= 0,
+		.channels	= 0,
+		.bootable	= EOL,
 	}
 };
 
drivers/ide/pci/slc90e66.h renamed from drivers/ide/pci/slc90e66.h.old +20 -20
@@ -19,10 +19,10 @@
 
 static ide_pci_host_proc_t slc90e66_procs[] __initdata = {
 	{
-		name:		"slc90e66",
-		set:		1,
-		get_info:	slc90e66_get_info,
-		parent:		NULL,
+		.name		= "slc90e66",
+		.set		= 1,
+		.get_info	= slc90e66_get_info,
+		.parent		= NULL,
 	},
 };
 #endif	/* defined(DISPLAY_SLC90E66_TIMINGS) && defined(CONFIG_PROC_FS) */
@@ -33,23 +33,23 @@
 
 static ide_pci_device_t slc90e66_chipsets[] __devinitdata = {
 	{	/* 0 */
-		vendor:		PCI_VENDOR_ID_EFAR,
-		device:		PCI_DEVICE_ID_EFAR_SLC90E66_1,
-		name:		"SLC90E66",
-		init_chipset:	init_chipset_slc90e66,
-		init_iops:	NULL,
-		init_hwif:	init_hwif_slc90e66,
-		init_dma:	init_dma_slc90e66,
-		channels:	2,
-		autodma:	AUTODMA,
-		enablebits:	{{0x41,0x80,0x80}, {0x43,0x80,0x80}},
-		bootable:	ON_BOARD,
-		extra:		0,
+		.vendor		= PCI_VENDOR_ID_EFAR,
+		.device		= PCI_DEVICE_ID_EFAR_SLC90E66_1,
+		.name		= "SLC90E66",
+		.init_chipset	= init_chipset_slc90e66,
+		.init_iops	= NULL,
+		.init_hwif	= init_hwif_slc90e66,
+		.init_dma	= init_dma_slc90e66,
+		.channels	= 2,
+		.autodma	= AUTODMA,
+		.enablebits	= {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
+		.bootable	= ON_BOARD,
+		.extra		= 0,
 	},{
-		vendor:		0,
-		device:		0,
-		channels:	0,
-		bootable:	EOL,
+		.vendor		= 0,
+		.device		= 0,
+		.channels	= 0,
+		.bootable	= EOL,
 	}
 };
 
drivers/ide/pci/trm290.h renamed from drivers/ide/pci/trm290.h.old +16 -16
@@ -9,23 +9,23 @@
 
 static ide_pci_device_t trm290_chipsets[] __devinitdata = {
 	{	/* 0 */
-		vendor:		PCI_VENDOR_ID_TEKRAM,
-		device:		PCI_DEVICE_ID_TEKRAM_DC290,
-		name:		"TRM290",
-		init_chipset:	NULL,
-		init_iops:	NULL,
-		init_hwif:	init_hwif_trm290,
-		init_dma:	NULL,
-		channels:	2,
-		autodma:	NOAUTODMA,
-		enablebits:	{{0x00,0x00,0x00}, {0x00,0x00,0x00}},
-		bootable:	ON_BOARD,
-		extra:		0,
+		.vendor		= PCI_VENDOR_ID_TEKRAM,
+		.device		= PCI_DEVICE_ID_TEKRAM_DC290,
+		.name		= "TRM290",
+		.init_chipset	= NULL,
+		.init_iops	= NULL,
+		.init_hwif	= init_hwif_trm290,
+		.init_dma	= NULL,
+		.channels	= 2,
+		.autodma	= NOAUTODMA,
+		.enablebits	= {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
+		.bootable	= ON_BOARD,
+		.extra		= 0,
 	},{
-		vendor:		0,
-		device:		0,
-		channels:	0,
-		bootable:	EOL,
+		.vendor		= 0,
+		.device		= 0,
+		.channels	= 0,
+		.bootable	= EOL,
 	}
 };
 
drivers/ide/pci/via82cxxx.h renamed from drivers/ide/pci/via82cxxx.h.old +32 -32

78 lines not on this page · raw message

Signature · 3 lines
They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety.
 -- Benjamin Franklin, Historical Review of Pennsylvania, 1759
#1 lore raw

Em Mon, Nov 11, 2002 at 09:59:45AM -0600, Art Haas escreveu:

Quoted 3 lines

Here's the second patch for drivers/ide/pci that switch the header files (and two lines in serverworks.c) to use C99 designated initializers. The patches are against 2.5.47.

Art, comments below

Quoted 15 lines
drivers/ide/pci/opti621.h renamed from drivers/ide/pci/opti621.h.old +0 -9
@@ -11,38 +11,38 @@
 
 static ide_pci_device_t opti621_chipsets[] __devinitdata = {
 	{	/* 0 */
-		vendor:		PCI_VENDOR_ID_OPTI,
-		device:		PCI_DEVICE_ID_OPTI_82C621,
-		name:		"OPTI621",
-		init_setup:	init_setup_opti621,
-		init_chipset:	NULL,
-		init_iops:	NULL,
-		init_hwif:	init_hwif_opti621,
-		init_dma:	init_dma_opti621,
-		channels:	2,

drivers/ide/pci/opti621.h line 19

Quoted 10 lines
drivers/ide/pci/opti621.h renamed from drivers/ide/pci/opti621.h.old +6 -4
-		autodma:	AUTODMA,
-		enablebits:	{{0x45,0x80,0x00}, {0x40,0x08,0x00}},
-		bootable:	ON_BOARD,
-		extra:		0,
+		.vendor		= PCI_VENDOR_ID_OPTI,
+		.device		= PCI_DEVICE_ID_OPTI_82C621,
+		.name		= "OPTI621",
+		.init_setup	= init_setup_opti621,
+		.init_chipset	= NULL,
+		.init_iops	= NULL,

Those two lines can be removed

drivers/ide/pci/opti621.h line 26

Quoted 7 lines
drivers/ide/pci/opti621.h renamed from drivers/ide/pci/opti621.h.old +7 -0
+		.init_hwif	= init_hwif_opti621,
+		.init_dma	= init_dma_opti621,
+		.channels	= 2,
+		.autodma	= AUTODMA,
+		.enablebits	= {{0x45,0x80,0x00}, {0x40,0x08,0x00}},
+		.bootable	= ON_BOARD,
+		.extra		= 0,

This one as well

Quoted 10 lines
drivers/ide/pci/opti621.h renamed from drivers/ide/pci/opti621.h.old +0 -9
 	},{	/* 1 */
-		vendor:		PCI_VENDOR_ID_OPTI,
-		device:		PCI_DEVICE_ID_OPTI_82C825,
-		name:		"OPTI621X",
-		init_setup:	init_setup_opti621,
-		init_chipset:	NULL,
-		init_iops:	NULL,
-		init_hwif:	init_hwif_opti621,
-                init_dma:	init_dma_opti621,
-		channels:	2,

drivers/ide/pci/opti621.h line 33

Quoted 10 lines
drivers/ide/pci/opti621.h renamed from drivers/ide/pci/opti621.h.old +6 -4
-		autodma:	AUTODMA,
-		enablebits:	{{0x45,0x80,0x00}, {0x40,0x08,0x00}},
-		bootable:	ON_BOARD,
-		extra:		0,
+		.vendor		= PCI_VENDOR_ID_OPTI,
+		.device		= PCI_DEVICE_ID_OPTI_82C825,
+		.name		= "OPTI621X",
+		.init_setup	= init_setup_opti621,
+		.init_chipset	= NULL,
+		.init_iops	= NULL,

Ditto

drivers/ide/pci/opti621.h line 26

Quoted 7 lines
drivers/ide/pci/opti621.h renamed from drivers/ide/pci/opti621.h.old +7 -0
+		.init_hwif	= init_hwif_opti621,
+                .init_dma	= init_dma_opti621,
+		.channels	= 2,
+		.autodma	= AUTODMA,
+		.enablebits	= {{0x45,0x80,0x00}, {0x40,0x08,0x00}},
+		.bootable	= ON_BOARD,
+		.extra		= 0,

Ditto

drivers/ide/pci/opti621.h line 46

Quoted 10 lines
drivers/ide/pci/opti621.h renamed from drivers/ide/pci/opti621.h.old +4 -4
 	},{
-		vendor:		0,
-		device:		0,
-		channels:	0,
-		bootable:	EOL,
+		.vendor		= 0,
+		.device		= 0,
+		.channels	= 0,
+		.bootable	= EOL,
 	}

Here a { .bootable = EOL, } would do it, no need for the others

Ditto for the other patches that I just snipped

- Arnaldo