Commit 9b3a6b6a authored by Art Haas's avatar Art Haas Committed by Linus Torvalds

[PATCH] C99 initializers for drivers/net

parent af91bc10
......@@ -1525,7 +1525,7 @@ static void set_multicast_list(struct net_device *dev)
}
#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;
......
......@@ -1012,7 +1012,7 @@ static struct net_device_stats *cops_get_stats(struct net_device *dev)
}
#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");
......
......@@ -145,17 +145,17 @@ static int e100_notify_reboot(struct notifier_block *, unsigned long event, void
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);
......
......@@ -310,7 +310,7 @@ e1000_check_options(struct e1000_adapter *adapter)
.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 @@ e1000_check_options(struct e1000_adapter *adapter)
.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 @@ e1000_check_options(struct e1000_adapter *adapter)
.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 @@ e1000_check_options(struct e1000_adapter *adapter)
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 @@ e1000_check_options(struct e1000_adapter *adapter)
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 @@ e1000_check_options(struct e1000_adapter *adapter)
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 @@ e1000_check_options(struct e1000_adapter *adapter)
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 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
.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 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
.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 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
.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];
......
......@@ -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);
......
......@@ -75,16 +75,16 @@ static struct irda_usb_cb irda_instance[NIRUSB];
/* 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 */
};
......
......@@ -938,12 +938,12 @@ toshoboe_resume (struct pci_dev *pci_dev)
}
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
......
......@@ -495,10 +495,10 @@ static int vlsi_proc_release(struct inode *inode, struct file *file)
}
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
......
......@@ -1565,9 +1565,9 @@ static struct parisc_device_id lan_tbl[] = {
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)
......
......@@ -1210,7 +1210,7 @@ static void set_multicast_list(struct net_device *dev)
}
#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;
......
......@@ -392,13 +392,13 @@ static int pcnet32_wio_check (unsigned long addr)
}
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 int pcnet32_dwio_check (unsigned long addr)
}
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 void pcnet32_watchdog(struct net_device *dev)
}
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");
......
......@@ -1761,10 +1761,10 @@ static struct pci_device_id rr_pci_tbl[] __devinitdata = {
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)
......
......@@ -707,7 +707,7 @@ inline void wait_for_buffer(struct net_device * dev)
#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");
......
......@@ -1753,10 +1753,10 @@ static void __devexit sundance_remove1 (struct pci_dev *pdev)
}
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)
......
......@@ -2557,7 +2557,7 @@ static int gem_ethtool_ioctl(struct net_device *dev, void *ep_user)
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 @@ static int gem_ethtool_ioctl(struct net_device *dev, void *ep_user)
/* 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 @@ static int gem_ethtool_ioctl(struct net_device *dev, void *ep_user)
/* 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)))
......
......@@ -181,10 +181,10 @@ static __inline__ void tx_dump_ring(struct happy_meal *hp)
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 */
};
......
......@@ -369,7 +369,7 @@ orinoco_cs_config(dev_link_t *link)
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment