Commit 9fa0108b authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] Initializer conversions for drivers/block

The old form of designated initializers are obsolete: we need to
replace them with the ISO C forms before 2.6.  Gcc has always supported
both forms anyway.
parent 8ca833f8
...@@ -374,7 +374,7 @@ static int acsi_revalidate (struct gendisk *disk); ...@@ -374,7 +374,7 @@ static int acsi_revalidate (struct gendisk *disk);
/************************* End of Prototypes **************************/ /************************* End of Prototypes **************************/
struct timer_list acsi_timer = { function: acsi_times_out }; struct timer_list acsi_timer = { .function = acsi_times_out };
#ifdef CONFIG_ATARI_SLM #ifdef CONFIG_ATARI_SLM
......
...@@ -273,12 +273,12 @@ static int slm_get_pagesize( int device, int *w, int *h ); ...@@ -273,12 +273,12 @@ static int slm_get_pagesize( int device, int *w, int *h );
static struct timer_list slm_timer = { function: slm_test_ready }; static struct timer_list slm_timer = { function: slm_test_ready };
static struct file_operations slm_fops = { static struct file_operations slm_fops = {
owner: THIS_MODULE, .owner = THIS_MODULE,
read: slm_read, .read = slm_read,
write: slm_write, .write = slm_write,
ioctl: slm_ioctl, .ioctl = slm_ioctl,
open: slm_open, .open = slm_open,
release: slm_release, .release = slm_release,
}; };
......
...@@ -2505,10 +2505,10 @@ static void __devexit cciss_remove_one (struct pci_dev *pdev) ...@@ -2505,10 +2505,10 @@ static void __devexit cciss_remove_one (struct pci_dev *pdev)
} }
static struct pci_driver cciss_pci_driver = { static struct pci_driver cciss_pci_driver = {
name: "cciss", .name = "cciss",
probe: cciss_init_one, .probe = cciss_init_one,
remove: __devexit_p(cciss_remove_one), .remove = __devexit_p(cciss_remove_one),
id_table: cciss_pci_device_id, /* id_table */ .id_table = cciss_pci_device_id, /* id_table */
}; };
/* /*
......
...@@ -380,9 +380,9 @@ inline struct list_head *elv_get_sort_head(request_queue_t *q, ...@@ -380,9 +380,9 @@ inline struct list_head *elv_get_sort_head(request_queue_t *q,
} }
elevator_t elevator_noop = { elevator_t elevator_noop = {
elevator_merge_fn: elevator_noop_merge, .elevator_merge_fn = elevator_noop_merge,
elevator_next_req_fn: elevator_noop_next_request, .elevator_next_req_fn = elevator_noop_next_request,
elevator_add_req_fn: elevator_noop_add_request, .elevator_add_req_fn = elevator_noop_add_request,
}; };
module_init(elevator_global_init); module_init(elevator_global_init);
......
...@@ -242,10 +242,10 @@ static int show_partition(struct seq_file *part, void *v) ...@@ -242,10 +242,10 @@ static int show_partition(struct seq_file *part, void *v)
} }
struct seq_operations partitions_op = { struct seq_operations partitions_op = {
start: part_start, .start =part_start,
next: part_next, .next = part_next,
stop: part_stop, .stop = part_stop,
show: show_partition .show = show_partition
}; };
#endif #endif
......
...@@ -137,15 +137,15 @@ static int xor_status(struct loop_device *lo, struct loop_info *info) ...@@ -137,15 +137,15 @@ static int xor_status(struct loop_device *lo, struct loop_info *info)
} }
struct loop_func_table none_funcs = { struct loop_func_table none_funcs = {
number: LO_CRYPT_NONE, .number = LO_CRYPT_NONE,
transfer: transfer_none, .transfer = transfer_none,
init: none_status, .init = none_status,
}; };
struct loop_func_table xor_funcs = { struct loop_func_table xor_funcs = {
number: LO_CRYPT_XOR, .number = LO_CRYPT_XOR,
transfer: transfer_xor, .transfer = transfer_xor,
init: xor_status .init = xor_status
}; };
/* xfer_funcs[0] is special - its release function is never called */ /* xfer_funcs[0] is special - its release function is never called */
...@@ -969,10 +969,10 @@ static int lo_release(struct inode *inode, struct file *file) ...@@ -969,10 +969,10 @@ static int lo_release(struct inode *inode, struct file *file)
} }
static struct block_device_operations lo_fops = { static struct block_device_operations lo_fops = {
owner: THIS_MODULE, .owner = THIS_MODULE,
open: lo_open, .open = lo_open,
release: lo_release, .release = lo_release,
ioctl: lo_ioctl, .ioctl = lo_ioctl,
}; };
/* /*
......
...@@ -466,10 +466,10 @@ static int nbd_release(struct inode *inode, struct file *file) ...@@ -466,10 +466,10 @@ static int nbd_release(struct inode *inode, struct file *file)
static struct block_device_operations nbd_fops = static struct block_device_operations nbd_fops =
{ {
owner: THIS_MODULE, .owner = THIS_MODULE,
open: nbd_open, .open = nbd_open,
release: nbd_release, .release = nbd_release,
ioctl: nbd_ioctl, .ioctl = nbd_ioctl,
}; };
/* /*
......
...@@ -254,11 +254,11 @@ static char pg_scratch[512]; /* scratch block buffer */ ...@@ -254,11 +254,11 @@ static char pg_scratch[512]; /* scratch block buffer */
/* kernel glue structures */ /* kernel glue structures */
static struct file_operations pg_fops = { static struct file_operations pg_fops = {
owner: THIS_MODULE, .owner = THIS_MODULE,
read: pg_read, .read = pg_read,
write: pg_write, .write = pg_write,
open: pg_open, .open = pg_open,
release: pg_release, .release = pg_release,
}; };
void pg_init_units( void ) void pg_init_units( void )
......
...@@ -256,12 +256,12 @@ static char pt_scratch[512]; /* scratch block buffer */ ...@@ -256,12 +256,12 @@ static char pt_scratch[512]; /* scratch block buffer */
/* kernel glue structures */ /* kernel glue structures */
static struct file_operations pt_fops = { static struct file_operations pt_fops = {
owner: THIS_MODULE, .owner = THIS_MODULE,
read: pt_read, .read = pt_read,
write: pt_write, .write = pt_write,
ioctl: pt_ioctl, .ioctl = pt_ioctl,
open: pt_open, .open = pt_open,
release: pt_release, .release = pt_release,
}; };
void pt_init_units( void ) void pt_init_units( void )
......
...@@ -107,7 +107,7 @@ static DECLARE_WAIT_QUEUE_HEAD(ps2esdi_int); ...@@ -107,7 +107,7 @@ static DECLARE_WAIT_QUEUE_HEAD(ps2esdi_int);
static int no_int_yet; static int no_int_yet;
static int ps2esdi_drives; static int ps2esdi_drives;
static u_short io_base; static u_short io_base;
static struct timer_list esdi_timer = { function: ps2esdi_reset_timer }; static struct timer_list esdi_timer = { .function = ps2esdi_reset_timer };
static int reset_status; static int reset_status;
static int ps2esdi_slot = -1; static int ps2esdi_slot = -1;
static int tp720esdi = 0; /* Is it Integrated ESDI of ThinkPad-720? */ static int tp720esdi = 0; /* Is it Integrated ESDI of ThinkPad-720? */
......
...@@ -140,10 +140,10 @@ static int ramdisk_commit_write(struct file *file, struct page *page, unsigned o ...@@ -140,10 +140,10 @@ static int ramdisk_commit_write(struct file *file, struct page *page, unsigned o
} }
static struct address_space_operations ramdisk_aops = { static struct address_space_operations ramdisk_aops = {
readpage: ramdisk_readpage, .readpage = ramdisk_readpage,
writepage: fail_writepage, .writepage = fail_writepage,
prepare_write: ramdisk_prepare_write, .prepare_write = ramdisk_prepare_write,
commit_write: ramdisk_commit_write, .commit_write = ramdisk_commit_write,
}; };
static int rd_blkdev_pagecache_IO(int rw, struct bio_vec *vec, sector_t sector, static int rd_blkdev_pagecache_IO(int rw, struct bio_vec *vec, sector_t sector,
...@@ -316,8 +316,8 @@ static int initrd_release(struct inode *inode,struct file *file) ...@@ -316,8 +316,8 @@ static int initrd_release(struct inode *inode,struct file *file)
static struct file_operations initrd_fops = { static struct file_operations initrd_fops = {
read: initrd_read, .read = initrd_read,
release: initrd_release, .release = initrd_release,
}; };
#endif #endif
...@@ -361,9 +361,9 @@ static int rd_open(struct inode * inode, struct file * filp) ...@@ -361,9 +361,9 @@ static int rd_open(struct inode * inode, struct file * filp)
} }
static struct block_device_operations rd_bd_op = { static struct block_device_operations rd_bd_op = {
owner: THIS_MODULE, .owner = THIS_MODULE,
open: rd_open, .open = rd_open,
ioctl: rd_ioctl, .ioctl = rd_ioctl,
}; };
/* Before freeing the module, invalidate all of the protected buffers! */ /* Before freeing the module, invalidate all of the protected buffers! */
......
...@@ -1117,18 +1117,18 @@ static void mm_pci_remove(struct pci_dev *dev) ...@@ -1117,18 +1117,18 @@ static void mm_pci_remove(struct pci_dev *dev)
} }
static const struct pci_device_id __devinitdata mm_pci_ids[] = { { static const struct pci_device_id __devinitdata mm_pci_ids[] = { {
vendor: PCI_VENDOR_ID_MICRO_MEMORY, .vendor = PCI_VENDOR_ID_MICRO_MEMORY,
device: PCI_DEVICE_ID_MICRO_MEMORY_5415CN, .device = PCI_DEVICE_ID_MICRO_MEMORY_5415CN,
}, { /* end: all zeroes */ } }, { /* end: all zeroes */ }
}; };
MODULE_DEVICE_TABLE(pci, mm_pci_ids); MODULE_DEVICE_TABLE(pci, mm_pci_ids);
static struct pci_driver mm_pci_driver = { static struct pci_driver mm_pci_driver = {
name: "umem", .name = "umem",
id_table: mm_pci_ids, .id_table = mm_pci_ids,
probe: mm_pci_probe, .probe = mm_pci_probe,
remove: mm_pci_remove, .remove = mm_pci_remove,
}; };
/* /*
----------------------------------------------------------------------------------- -----------------------------------------------------------------------------------
......
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