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