C99 initializers for drivers/net
Subsystems (2)
PATCH 1/1 C99 initializers for drivers/net
Hi.
Here's a small patchset for various files in drivers/net that switch these files to use C99 initializers. The patches are against 2.5.51.
Art Haas
drivers/net/e100/e100_main.c renamed from drivers/net/e100/e100_main.c.old +6 -6
@@ -145,17 +145,17 @@static int e100_suspend (struct pci_dev *pcid,u32 state);static int e100_resume (struct pci_dev *pcid);struct notifier_block e100_notifier_reboot = { - notifier_call: e100_notify_reboot, - next:NULL , - priority:0 + .notifier_call = e100_notify_reboot, + .next =NULL , + .priority =0 };#endif static int e100_notify_netdev (struct notifier_block *,unsigned long event,void *ptr);struct notifier_block e100_notifier_netdev = { - notifier_call: e100_notify_netdev, - next:NULL , - priority:0 + .notifier_call = e100_notify_netdev, + .next =NULL , + .priority =0 };static void e100_get_mdix_status (struct e100_private *bdp);
drivers/net/irda/irda-usb.c renamed from drivers/net/irda/irda-usb.c.old +7 -7
@@ -75,16 +75,16 @@/* These are the currently known IrDA USB dongles. Add new dongles here */ static struct usb_device_id dongles[] = {/* ACTiSYS Corp, ACT-IR2000U FIR-USB Adapter */ - {USB_DEVICE (0x9c4 ,0x011 ), driver_info:IUC_SPEED_BUG |IUC_NO_WINDOW }, + {USB_DEVICE (0x9c4 ,0x011 ), .driver_info =IUC_SPEED_BUG |IUC_NO_WINDOW },/* KC Technology Inc., KC-180 USB IrDA Device */ - {USB_DEVICE (0x50f ,0x180 ), driver_info:IUC_SPEED_BUG |IUC_NO_WINDOW }, + {USB_DEVICE (0x50f ,0x180 ), .driver_info =IUC_SPEED_BUG |IUC_NO_WINDOW },/* Extended Systems, Inc., XTNDAccess IrDA USB (ESI-9685) */ - {USB_DEVICE (0x8e9 ,0x100 ), driver_info:IUC_SPEED_BUG |IUC_NO_WINDOW }, - { match_flags:USB_DEVICE_ID_MATCH_INT_CLASS | + {USB_DEVICE (0x8e9 ,0x100 ), .driver_info =IUC_SPEED_BUG |IUC_NO_WINDOW }, + { .match_flags =USB_DEVICE_ID_MATCH_INT_CLASS |USB_DEVICE_ID_MATCH_INT_SUBCLASS , - bInterfaceClass:USB_CLASS_APP_SPEC , - bInterfaceSubClass:USB_CLASS_IRDA , - driver_info:IUC_DEFAULT , }, + .bInterfaceClass =USB_CLASS_APP_SPEC , + .bInterfaceSubClass =USB_CLASS_IRDA , + .driver_info =IUC_DEFAULT , }, { },/* The end */ };
drivers/net/irda/vlsi_ir.c renamed from drivers/net/irda/vlsi_ir.c.old +4 -4
@@ -495,10 +495,10 @@ }static struct file_operations vlsi_proc_fops = { - open: vlsi_proc_open, - llseek: vlsi_proc_lseek, - read: vlsi_proc_read, - release: vlsi_proc_release, + .open = vlsi_proc_open, + .llseek = vlsi_proc_lseek, + .read = vlsi_proc_read, + .release = vlsi_proc_release, };#endif
drivers/net/irda/toshoboe.c renamed from drivers/net/irda/toshoboe.c.old +6 -6
@@ -938,12 +938,12 @@ }static struct pci_driver toshoboe_pci_driver = { - name :"toshoboe" , - id_table : toshoboe_pci_tbl, - probe : toshoboe_probe, - remove : toshoboe_remove, - suspend : toshoboe_suspend, - resume : toshoboe_resume + .name ="toshoboe" , + .id_table = toshoboe_pci_tbl, + .probe = toshoboe_probe, + .remove = toshoboe_remove, + .suspend = toshoboe_suspend, + .resume = toshoboe_resume };int __init
drivers/net/appletalk/cops.c renamed from drivers/net/appletalk/cops.c.old +1 -1
@@ -1012,7 +1012,7 @@ }#ifdef MODULE -static struct net_device cops0_dev = { init: cops_probe }; +static struct net_device cops0_dev = { .init = cops_probe };MODULE_LICENSE ("GPL" );MODULE_PARM (io,"i" );
drivers/net/fc/iph5526_scsi.h renamed from drivers/net/fc/iph5526_scsi.h.old +15 -15
@@ -3,21 +3,21 @@#define IPH5526_CAN_QUEUE 32#define IPH5526_SCSI_FC { \ - name: "Interphase 5526 Fibre Channel SCSI Adapter", \ - detect: iph5526_detect, \ - release: iph5526_release, \ - info: iph5526_info, \ - queuecommand: iph5526_queuecommand, \ - bios_param: iph5526_biosparam, \ - can_queue: IPH5526_CAN_QUEUE, \ - this_id: -1, \ - sg_tablesize: 255, \ - cmd_per_lun: 8, \ - use_clustering: DISABLE_CLUSTERING, \ - eh_abort_handler: iph5526_abort, \ - eh_device_reset_handler:NULL, \ - eh_bus_reset_handler: NULL, \ - eh_host_reset_handler: NULL, \ + .name = "Interphase 5526 Fibre Channel SCSI Adapter", \ + .detect = iph5526_detect, \ + .release = iph5526_release, \ + .info = iph5526_info, \ + .queuecommand = iph5526_queuecommand, \ + .bios_param = iph5526_biosparam, \ + .can_queue = IPH5526_CAN_QUEUE, \ + .this_id = -1, \ + .sg_tablesize = 255, \ + .cmd_per_lun = 8, \ + .use_clustering = DISABLE_CLUSTERING, \ + .eh_abort_handler = iph5526_abort, \ + .eh_device_reset_handler = NULL, \ + .eh_bus_reset_handler = NULL, \ + .eh_host_reset_handler = NULL, \ }int iph5526_detect (Scsi_Host_Template *tmpt);
drivers/net/e1000/e1000_param.c renamed from drivers/net/e1000/e1000_param.c.old +10 -10
@@ -310,7 +310,7 @@ .name = "Transmit Descriptors", .err = "using default of " __MODULE_STRING(DEFAULT_TXD), .def = DEFAULT_TXD, - .arg = { r: { min: MIN_TXD }} + .arg = { .r = { .min = MIN_TXD }} };struct e1000_desc_ring *tx_ring = &adapter->tx_ring;e1000_mac_type mac_type = adapter->hw.mac_type;
@@ -327,7 +327,7 @@ .name = "Receive Descriptors", .err = "using default of " __MODULE_STRING(DEFAULT_RXD), .def = DEFAULT_RXD, - .arg = { r: { min: MIN_RXD }} + .arg = { .r = { .min = MIN_RXD }} };struct e1000_desc_ring *rx_ring = &adapter->rx_ring;e1000_mac_type mac_type = adapter->hw.mac_type;
@@ -363,7 +363,7 @@ .name = "Flow Control", .err = "reading default settings from EEPROM", .def = e1000_fc_default, - .arg = { l: { nr: ARRAY_SIZE(fc_list), p: fc_list }} + .arg = { .l = { .nr = ARRAY_SIZE(fc_list), .p = fc_list }} };int fc = FlowControl[bd];
@@ -375,7 +375,7 @@struct e1000_option opt = { .type = range_option, .name ="Transmit Interrupt Delay" , - .arg = { r: { min:MIN_TXDELAY , max:MAX_TXDELAY }} + .arg = { .r = { .min =MIN_TXDELAY , .max =MAX_TXDELAY }} }; opt.def =DEFAULT_TIDV ; opt.err = tidv;
@@ -388,7 +388,7 @@struct e1000_option opt = { .type = range_option, .name ="Transmit Absolute Interrupt Delay" , - .arg = { r: { min:MIN_TXABSDELAY , max:MAX_TXABSDELAY }} + .arg = { .r = { .min =MIN_TXABSDELAY , .max =MAX_TXABSDELAY }} }; opt.def =DEFAULT_TADV ; opt.err = tadv;
@@ -401,7 +401,7 @@struct e1000_option opt = { .type = range_option, .name ="Receive Interrupt Delay" , - .arg = { r: { min:MIN_RXDELAY , max:MAX_RXDELAY }} + .arg = { .r = { .min =MIN_RXDELAY , .max =MAX_RXDELAY }} }; opt.def =DEFAULT_RDTR ; opt.err = rdtr;
@@ -414,7 +414,7 @@struct e1000_option opt = { .type = range_option, .name ="Receive Absolute Interrupt Delay" , - .arg = { r: { min:MIN_RXABSDELAY , max:MAX_RXABSDELAY }} + .arg = { .r = { .min =MIN_RXABSDELAY , .max =MAX_RXABSDELAY }} }; opt.def =DEFAULT_RADV ; opt.err = radv;
@@ -486,7 +486,7 @@ .name = "Speed", .err = "parameter ignored", .def = 0, - .arg = { l: { nr: ARRAY_SIZE(speed_list), p: speed_list }} + .arg = { .l = { .nr = ARRAY_SIZE(speed_list), .p = speed_list }} }; speed = Speed[bd];
@@ -501,7 +501,7 @@ .name = "Duplex", .err = "parameter ignored", .def = 0, - .arg = { l: { nr: ARRAY_SIZE(dplx_list), p: dplx_list }} + .arg = { .l = { .nr = ARRAY_SIZE(dplx_list), .p = dplx_list }} }; dplx = Duplex[bd];
@@ -553,7 +553,7 @@ .name = "AutoNeg", .err = "parameter ignored", .def = AUTONEG_ADV_DEFAULT, - .arg = { l: { nr: ARRAY_SIZE(an_list), p: an_list }} + .arg = { .l = { .nr = ARRAY_SIZE(an_list), .p = an_list }} };int an = AutoNeg[bd];
drivers/net/wireless/orinoco_cs.c renamed from drivers/net/wireless/orinoco_cs.c.old +1 -1
@@ -369,7 +369,7 @@CS_CHECK (GetFirstTuple, handle, &tuple);while (1 ) {cistpl_cftable_entry_t *cfg = &(parse.cftable_entry); -cistpl_cftable_entry_t dflt = { index:0 }; +cistpl_cftable_entry_t dflt = { .index =0 };CFG_CHECK (GetTupleData, handle, &tuple);CFG_CHECK (ParseTuple, handle, &tuple, &parse);
drivers/net/sungem.c renamed from drivers/net/sungem.c.old +3 -3
@@ -2557,7 +2557,7 @@switch (ecmd.cmd) {case ETHTOOL_GDRVINFO : { -struct ethtool_drvinfo info = { cmd:ETHTOOL_GDRVINFO }; +struct ethtool_drvinfo info = { .cmd =ETHTOOL_GDRVINFO };strncpy (info.driver,DRV_NAME ,ETHTOOL_BUSINFO_LEN );strncpy (info.version,DRV_VERSION ,ETHTOOL_BUSINFO_LEN );
@@ -2652,7 +2652,7 @@/* get link status */ case ETHTOOL_GLINK : { -struct ethtool_value edata = { cmd:ETHTOOL_GLINK }; +struct ethtool_value edata = { .cmd =ETHTOOL_GLINK }; edata.data = (gp->lstate == link_up);if (copy_to_user (ep_user, &edata,sizeof (edata)))
@@ -2662,7 +2662,7 @@/* get message-level */ case ETHTOOL_GMSGLVL : { -struct ethtool_value edata = { cmd:ETHTOOL_GMSGLVL }; +struct ethtool_value edata = { .cmd =ETHTOOL_GMSGLVL }; edata.data = gp->msg_enable;if (copy_to_user (ep_user, &edata,sizeof (edata)))
drivers/net/ni65.c renamed from drivers/net/ni65.c.old +1 -1
@@ -1210,7 +1210,7 @@ }#ifdef MODULE -static struct net_device dev_ni65 = { base_addr:0x360 , irq:9 , init: ni65_probe }; +static struct net_device dev_ni65 = { .base_addr =0x360 , .irq =9 , .init = ni65_probe };/* set: io,irq,dma or set it when calling insmod */ static int irq;
drivers/net/seeq8005.c renamed from drivers/net/seeq8005.c.old +1 -1
@@ -707,7 +707,7 @@#ifdef MODULE -static struct net_device dev_seeq = { init: seeq8005_probe }; +static struct net_device dev_seeq = { .init = seeq8005_probe };static int io =0x320 ;static int irq =10 ;MODULE_LICENSE ("GPL" );
drivers/net/82596.c renamed from drivers/net/82596.c.old +1 -1
@@ -1525,7 +1525,7 @@ }#ifdef MODULE -static struct net_device dev_82596 = { init: i82596_probe }; +static struct net_device dev_82596 = { .init = i82596_probe };#ifdef ENABLE_APRICOT static int io =0x300 ;
drivers/net/sunhme.c renamed from drivers/net/sunhme.c.old +4 -4
@@ -181,10 +181,10 @@struct pci_device_id happymeal_pci_ids[]__initdata = { { - vendor:PCI_VENDOR_ID_SUN , - device:PCI_DEVICE_ID_SUN_HAPPYMEAL , - subvendor:PCI_ANY_ID , - subdevice:PCI_ANY_ID , + .vendor =PCI_VENDOR_ID_SUN , + .device =PCI_DEVICE_ID_SUN_HAPPYMEAL , + .subvendor =PCI_ANY_ID , + .subdevice =PCI_ANY_ID , }, { }/* Terminating entry */ };
drivers/net/pcnet32.c renamed from drivers/net/pcnet32.c.old +17 -17
@@ -392,13 +392,13 @@ }static struct pcnet32_access pcnet32_wio = { - read_csr: pcnet32_wio_read_csr, - write_csr: pcnet32_wio_write_csr, - read_bcr: pcnet32_wio_read_bcr, - write_bcr: pcnet32_wio_write_bcr, - read_rap: pcnet32_wio_read_rap, - write_rap: pcnet32_wio_write_rap, - reset: pcnet32_wio_reset + .read_csr = pcnet32_wio_read_csr, + .write_csr = pcnet32_wio_write_csr, + .read_bcr = pcnet32_wio_read_bcr, + .write_bcr = pcnet32_wio_write_bcr, + .read_rap = pcnet32_wio_read_rap, + .write_rap = pcnet32_wio_write_rap, + .reset = pcnet32_wio_reset };static u16 pcnet32_dwio_read_csr (unsigned long addr,int index)
@@ -447,13 +447,13 @@ }static struct pcnet32_access pcnet32_dwio = { - read_csr: pcnet32_dwio_read_csr, - write_csr: pcnet32_dwio_write_csr, - read_bcr: pcnet32_dwio_read_bcr, - write_bcr: pcnet32_dwio_write_bcr, - read_rap: pcnet32_dwio_read_rap, - write_rap: pcnet32_dwio_write_rap, - reset: pcnet32_dwio_reset + .read_csr = pcnet32_dwio_read_csr, + .write_csr = pcnet32_dwio_write_csr, + .read_bcr = pcnet32_dwio_read_bcr, + .write_bcr = pcnet32_dwio_write_bcr, + .read_rap = pcnet32_dwio_read_rap, + .write_rap = pcnet32_dwio_write_rap, + .reset = pcnet32_dwio_reset };
@@ -1682,9 +1682,9 @@ }static struct pci_driver pcnet32_driver = { - name:DRV_NAME , - probe: pcnet32_probe_pci, - id_table: pcnet32_pci_tbl, + .name =DRV_NAME , + .probe = pcnet32_probe_pci, + .id_table = pcnet32_pci_tbl, };MODULE_PARM (debug,"i" );
drivers/net/sundance.c renamed from drivers/net/sundance.c.old +4 -4
@@ -1753,10 +1753,10 @@ }static struct pci_driver sundance_driver = { - name:DRV_NAME , - id_table: sundance_pci_tbl, - probe: sundance_probe1, - remove:__devexit_p (sundance_remove1), + .name =DRV_NAME , + .id_table = sundance_pci_tbl, + .probe = sundance_probe1, + .remove =__devexit_p (sundance_remove1), };static int __init sundance_init (void )
drivers/net/rrunner.c renamed from drivers/net/rrunner.c.old +4 -4
@@ -1761,10 +1761,10 @@MODULE_DEVICE_TABLE (pci, rr_pci_tbl);static struct pci_driver rr_driver = { - name:"rrunner" , - id_table: rr_pci_tbl, - probe: rr_init_one, - remove: rr_remove_one, + .name ="rrunner" , + .id_table = rr_pci_tbl, + .probe = rr_init_one, + .remove = rr_remove_one, };static int __init rr_init_module (void )
drivers/net/lasi_82596.c renamed from drivers/net/lasi_82596.c.old +3 -3
@@ -1565,9 +1565,9 @@MODULE_DEVICE_TABLE (parisc, lan_tbl);static struct parisc_driver lan_driver = { - name:"Apricot" , - id_table: lan_tbl, - probe: lan_init_chip, + .name ="Apricot" , + .id_table = lan_tbl, + .probe = lan_init_chip, };static int __devinit lasi_82596_init (void )
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