Commit ec4d1c68 authored by Matthew Wilcox's avatar Matthew Wilcox Committed by Linus Torvalds

[PATCH] C99 initialisers

C99 initialiser conversion; some from Rusty, some from me.
parent a0a03125
......@@ -54,14 +54,14 @@ static void def_init_hw(void)
static char def_sysrq_xlate[NR_KEYS];
#define DEFAULT_KEYB_OPS \
setkeycode: def_setkeycode, \
getkeycode: def_getkeycode, \
translate: def_translate, \
unexpected_up: def_unexpected_up, \
leds: def_leds, \
init_hw: def_init_hw, \
sysrq_key: 0xff, \
sysrq_xlate: def_sysrq_xlate,
.setkeycode = def_setkeycode, \
.getkeycode = def_getkeycode, \
.translate = def_translate, \
.unexpected_up = def_unexpected_up, \
.leds = def_leds, \
.init_hw = def_init_hw, \
.sysrq_key = 0xff, \
.sysrq_xlate = def_sysrq_xlate,
static struct kbd_ops def_kbd_ops = {
DEFAULT_KEYB_OPS
......
......@@ -79,8 +79,8 @@ static int pdc_chassis_panic_event(struct notifier_block *this,
static struct notifier_block pdc_chassis_panic_block = {
notifier_call: pdc_chassis_panic_event,
priority: INT_MAX,
.notifier_call = pdc_chassis_panic_event,
.priority = INT_MAX,
};
......@@ -99,8 +99,8 @@ static int pdc_chassis_reboot_event(struct notifier_block *this,
static struct notifier_block pdc_chassis_reboot_block = {
notifier_call: pdc_chassis_reboot_event,
priority: INT_MAX,
.notifier_call = pdc_chassis_reboot_event,
.priority = INT_MAX,
};
......
......@@ -52,26 +52,23 @@ static int pdc_console_setup(struct console *co, char *options)
return 0;
}
#ifdef CONFIG_PDC_CONSOLE
#if defined(CONFIG_PDC_CONSOLE) || defined(CONFIG_SERIAL_MUX)
#define PDC_CONSOLE_DEVICE pdc_console_device
static kdev_t pdc_console_device (struct console *c)
{
return mk_kdev(PDCCONS_MAJOR, 0);
}
#endif
#ifdef CONFIG_PDC_CONSOLE
#define PDC_CONSOLE_DEVICE pdc_console_device
#else
#define PDC_CONSOLE_DEVICE NULL
#endif
static struct console pdc_cons = {
name: "ttyB",
write: pdc_console_write,
device: PDC_CONSOLE_DEVICE,
setup: pdc_console_setup,
flags: CON_PRINTBUFFER|CON_ENABLED,
index: -1,
.name = "ttyB",
.write = pdc_console_write,
.device = PDC_CONSOLE_DEVICE,
.setup = pdc_console_setup,
.flags = CON_BOOT|CON_PRINTBUFFER|CON_ENABLED,
.index = -1,
};
static int pdc_console_initialized;
......@@ -93,9 +90,9 @@ static void pdc_console_init_force(void)
register_console(&pdc_cons);
}
void pdc_console_init(void)
void __init pdc_console_init(void)
{
#if defined(EARLY_BOOTUP_DEBUG) || defined(CONFIG_PDC_CONSOLE)
#if defined(EARLY_BOOTUP_DEBUG) || defined(CONFIG_PDC_CONSOLE) || defined(CONFIG_SERIAL_MUX)
pdc_console_init_force();
#endif
#ifdef EARLY_BOOTUP_DEBUG
......
......@@ -481,12 +481,12 @@ static int perf_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
}
static struct file_operations perf_fops = {
llseek: no_llseek,
read: perf_read,
write: perf_write,
ioctl: perf_ioctl,
open: perf_open,
release: perf_release
.llseek = no_llseek,
.read = perf_read,
.write = perf_write,
.ioctl = perf_ioctl,
.open = perf_open,
.release = perf_release
};
static struct miscdevice perf_dev = {
......
......@@ -370,9 +370,9 @@ static struct parisc_device_id processor_tbl[] = {
};
static struct parisc_driver cpu_driver = {
name: "CPU",
id_table: processor_tbl,
probe: processor_probe
.name = "CPU",
.id_table = processor_tbl,
.probe = processor_probe
};
/**
......
......@@ -179,10 +179,10 @@ c_stop (struct seq_file *m, void *v)
}
struct seq_operations cpuinfo_op = {
start: c_start,
next: c_next,
stop: c_stop,
show: show_cpuinfo
.start = c_start,
.next = c_next,
.stop = c_stop,
.show = show_cpuinfo
};
static void parisc_proc_mkdir(void)
......@@ -216,24 +216,24 @@ static void parisc_proc_mkdir(void)
}
static struct resource central_bus = {
name: "Central Bus",
start: (unsigned long)0xfffffffffff80000,
end: (unsigned long)0xfffffffffffaffff,
flags: IORESOURCE_MEM,
.name = "Central Bus",
.start = (unsigned long)0xfffffffffff80000,
.end = (unsigned long)0xfffffffffffaffff,
.flags = IORESOURCE_MEM,
};
static struct resource local_broadcast = {
name: "Local Broadcast",
start: (unsigned long)0xfffffffffffb0000,
end: (unsigned long)0xfffffffffffdffff,
flags: IORESOURCE_MEM,
.name = "Local Broadcast",
.start = (unsigned long)0xfffffffffffb0000,
.end = (unsigned long)0xfffffffffffdffff,
.flags = IORESOURCE_MEM,
};
static struct resource global_broadcast = {
name: "Global Broadcast",
start: (unsigned long)0xfffffffffffe0000,
end: (unsigned long)0xffffffffffffffff,
flags: IORESOURCE_MEM,
.name = "Global Broadcast",
.start = (unsigned long)0xfffffffffffe0000,
.end = (unsigned long)0xffffffffffffffff,
.flags = IORESOURCE_MEM,
};
int __init parisc_init_resources(void)
......
......@@ -38,20 +38,20 @@ unsigned int maxchunkmap;
#endif
static struct resource data_resource = {
name: "Kernel data",
flags: IORESOURCE_BUSY | IORESOURCE_MEM,
.name = "Kernel data",
.flags = IORESOURCE_BUSY | IORESOURCE_MEM,
};
static struct resource code_resource = {
name: "Kernel code",
flags: IORESOURCE_BUSY | IORESOURCE_MEM,
.name = "Kernel code",
.flags = IORESOURCE_BUSY | IORESOURCE_MEM,
};
static struct resource pdcdata_resource = {
name: "PDC data (Page Zero)",
start: 0,
end: 0x9ff,
flags: IORESOURCE_BUSY | IORESOURCE_MEM,
.name = "PDC data (Page Zero)",
.start = 0,
.end = 0x9ff,
.flags = IORESOURCE_BUSY | IORESOURCE_MEM,
};
static struct resource sysram_resources[MAX_PHYSMEM_RANGES];
......
......@@ -125,7 +125,7 @@ static struct parisc_device_id asp_tbl[] = {
};
struct parisc_driver asp_driver = {
name: "Asp",
id_table: asp_tbl,
probe: asp_init_chip,
.name = "Asp",
.id_table = asp_tbl,
.probe = asp_init_chip,
};
......@@ -1596,9 +1596,9 @@ static struct parisc_device_id ccio_tbl[] = {
};
static struct parisc_driver ccio_driver = {
name: "U2/Uturn",
id_table: ccio_tbl,
probe: ccio_probe,
.name = "U2/Uturn",
.id_table = ccio_tbl,
.probe = ccio_probe,
};
/**
......
......@@ -191,9 +191,9 @@ static struct parisc_device_id ccio_tbl[] = {
};
static struct parisc_driver ccio_driver = {
name: "U2/Uturn",
id_table: ccio_tbl,
probe: ccio_probe,
.name = "U2/Uturn",
.id_table = ccio_tbl,
.probe = ccio_probe,
};
void __init ccio_init(void)
......
......@@ -917,9 +917,9 @@ static struct parisc_device_id dino_tbl[] = {
};
static struct parisc_driver dino_driver = {
.name = "Dino",
.id_table = dino_tbl,
.probe = dino_driver_callback,
.name = "Dino",
.id_table = dino_tbl,
.probe = dino_driver_callback,
};
/*
......
......@@ -387,9 +387,9 @@ static struct parisc_device_id __devinitdata eisa_tbl[] = {
MODULE_DEVICE_TABLE(parisc, eisa_tbl);
static struct parisc_driver eisa_driver = {
name: "EISA Bus Adapter",
id_table: eisa_tbl,
probe: eisa_probe,
.name = "EISA Bus Adapter",
.id_table = eisa_tbl,
.probe = eisa_probe,
};
void __init eisa_init(void)
......
......@@ -79,12 +79,12 @@ static int eisa_eeprom_release(struct inode *inode, struct file *file)
* The various file operations we support.
*/
static struct file_operations eisa_eeprom_fops = {
owner: THIS_MODULE,
llseek: eisa_eeprom_llseek,
read: eisa_eeprom_read,
ioctl: eisa_eeprom_ioctl,
open: eisa_eeprom_open,
release: eisa_eeprom_release,
.owner = THIS_MODULE,
.llseek = eisa_eeprom_llseek,
.read = eisa_eeprom_read,
.ioctl = eisa_eeprom_ioctl,
.open = eisa_eeprom_open,
.release = eisa_eeprom_release,
};
static struct miscdevice eisa_eeprom_dev=
......
......@@ -152,10 +152,10 @@ busdev_unmask_irq(void *irq_dev, int irq)
}
struct irq_region_ops busdev_irq_ops = {
disable_irq: busdev_disable_irq,
enable_irq: busdev_enable_irq,
mask_irq: busdev_mask_irq,
unmask_irq: busdev_unmask_irq
.disable_irq = busdev_disable_irq,
.enable_irq = busdev_enable_irq,
.mask_irq = busdev_mask_irq,
.unmask_irq = busdev_unmask_irq
};
......
......@@ -941,10 +941,10 @@ iosapic_unmask_irq(void *dev, int irq)
static struct irq_region_ops iosapic_irq_ops = {
disable_irq: iosapic_disable_irq,
enable_irq: iosapic_enable_irq,
mask_irq: iosapic_mask_irq,
unmask_irq: iosapic_unmask_irq
.disable_irq = iosapic_disable_irq,
.enable_irq = iosapic_enable_irq,
.mask_irq = iosapic_mask_irq,
.unmask_irq = iosapic_unmask_irq
};
......
......@@ -139,7 +139,7 @@ void __init lasi_led_init(unsigned long lasi_hpa)
default:
datareg = lasi_hpa + 0x0000C000;
break;
} /* switch() */
}
register_led_driver(DISPLAY_MODEL_LASI, LED_CMD_REG_NONE, (char *)datareg);
}
......@@ -239,7 +239,7 @@ static struct parisc_device_id lasi_tbl[] = {
};
struct parisc_driver lasi_driver = {
name: "Lasi",
id_table: lasi_tbl,
probe: lasi_init_chip,
.name = "Lasi",
.id_table = lasi_tbl,
.probe = lasi_init_chip,
};
......@@ -627,8 +627,8 @@ static int lba_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, int s
static struct pci_ops lba_cfg_ops = {
read: lba_cfg_read,
write: lba_cfg_write,
.read = lba_cfg_read,
.write = lba_cfg_write,
};
......@@ -865,8 +865,8 @@ lba_fixup_bus(struct pci_bus *bus)
struct pci_bios_ops lba_bios_ops = {
init: lba_bios_init,
fixup_bus: lba_fixup_bus,
.init = lba_bios_init,
.fixup_bus = lba_fixup_bus,
};
......@@ -943,12 +943,12 @@ LBA_PORT_OUT(32, 0)
static struct pci_port_ops lba_astro_port_ops = {
inb: lba_astro_in8,
inw: lba_astro_in16,
inl: lba_astro_in32,
outb: lba_astro_out8,
outw: lba_astro_out16,
outl: lba_astro_out32
.inb = lba_astro_in8,
.inw = lba_astro_in16,
.inl = lba_astro_in32,
.outb = lba_astro_out8,
.outw = lba_astro_out16,
.outl = lba_astro_out32
};
......@@ -1003,12 +1003,12 @@ LBA_PORT_OUT(32, 0)
static struct pci_port_ops lba_pat_port_ops = {
inb: lba_pat_in8,
inw: lba_pat_in16,
inl: lba_pat_in32,
outb: lba_pat_out8,
outw: lba_pat_out16,
outl: lba_pat_out32
.inb = lba_pat_in8,
.inw = lba_pat_in16,
.inl = lba_pat_in32,
.outb = lba_pat_out8,
.outw = lba_pat_out16,
.outl = lba_pat_out32
};
......@@ -1462,9 +1462,9 @@ static struct parisc_device_id lba_tbl[] = {
};
static struct parisc_driver lba_driver = {
name: MODULE_NAME,
id_table: lba_tbl,
probe: lba_driver_callback
.name = MODULE_NAME,
.id_table = lba_tbl,
.probe = lba_driver_callback
};
/*
......
......@@ -97,13 +97,13 @@ struct pdc_chassis_lcd_info_ret_block {
static struct pdc_chassis_lcd_info_ret_block
lcd_info __attribute__((aligned(8))) =
{
model: DISPLAY_MODEL_LCD,
lcd_width: 16,
lcd_cmd_reg_addr: (char *) KITTYHAWK_LCD_CMD,
lcd_data_reg_addr:(char *) KITTYHAWK_LCD_DATA,
min_cmd_delay: 40,
reset_cmd1: 0x80,
reset_cmd2: 0xc0,
.model = DISPLAY_MODEL_LCD,
.lcd_width = 16,
.lcd_cmd_reg_addr = (char *) KITTYHAWK_LCD_CMD,
.lcd_data_reg_addr = (char *) KITTYHAWK_LCD_DATA,
.min_cmd_delay = 40,
.reset_cmd1 = 0x80,
.reset_cmd2 = 0xc0,
};
......
......@@ -1919,9 +1919,9 @@ static struct parisc_device_id sba_tbl[] = {
int sba_driver_callback(struct parisc_device *);
static struct parisc_driver sba_driver = {
name: MODULE_NAME,
id_table: sba_tbl,
probe: sba_driver_callback,
.name = MODULE_NAME,
.id_table = sba_tbl,
.probe = sba_driver_callback,
};
/*
......
......@@ -72,7 +72,7 @@
#include <asm/superio.h>
static struct superio_device sio_dev = {
iosapic_irq: -1
.iosapic_irq = -1
};
......@@ -318,10 +318,10 @@ superio_unmask_irq(void *dev, int local_irq)
}
static struct irq_region_ops superio_irq_ops = {
disable_irq: superio_disable_irq,
enable_irq: superio_enable_irq,
mask_irq: superio_mask_irq,
unmask_irq: superio_unmask_irq
.disable_irq = superio_disable_irq,
.enable_irq = superio_enable_irq,
.mask_irq = superio_mask_irq,
.unmask_irq = superio_unmask_irq
};
#ifdef DEBUG_INIT
......@@ -523,9 +523,9 @@ static struct pci_device_id superio_tbl[] __devinitdata = {
};
static struct pci_driver superio_driver = {
name: "SuperIO",
id_table: superio_tbl,
probe: superio_probe,
.name = "SuperIO",
.id_table = superio_tbl,
.probe = superio_probe,
};
static int __init superio_modinit(void)
......
......@@ -135,7 +135,7 @@ static struct parisc_device_id wax_tbl[] = {
MODULE_DEVICE_TABLE(parisc, wax_tbl);
struct parisc_driver wax_driver = {
name: "Wax",
id_table: wax_tbl,
probe: wax_init_chip,
.name = "Wax",
.id_table = wax_tbl,
.probe = wax_init_chip,
};
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