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);
/************************* 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
......
......@@ -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 file_operations slm_fops = {
owner: THIS_MODULE,
read: slm_read,
write: slm_write,
ioctl: slm_ioctl,
open: slm_open,
release: slm_release,
.owner = THIS_MODULE,
.read = slm_read,
.write = slm_write,
.ioctl = slm_ioctl,
.open = slm_open,
.release = slm_release,
};
......
......@@ -2505,10 +2505,10 @@ static void __devexit cciss_remove_one (struct pci_dev *pdev)
}
static struct pci_driver cciss_pci_driver = {
name: "cciss",
probe: cciss_init_one,
remove: __devexit_p(cciss_remove_one),
id_table: cciss_pci_device_id, /* id_table */
.name = "cciss",
.probe = cciss_init_one,
.remove = __devexit_p(cciss_remove_one),
.id_table = cciss_pci_device_id, /* id_table */
};
/*
......
......@@ -380,9 +380,9 @@ inline struct list_head *elv_get_sort_head(request_queue_t *q,
}
elevator_t elevator_noop = {
elevator_merge_fn: elevator_noop_merge,
elevator_next_req_fn: elevator_noop_next_request,
elevator_add_req_fn: elevator_noop_add_request,
.elevator_merge_fn = elevator_noop_merge,
.elevator_next_req_fn = elevator_noop_next_request,
.elevator_add_req_fn = elevator_noop_add_request,
};
module_init(elevator_global_init);
......
......@@ -242,10 +242,10 @@ static int show_partition(struct seq_file *part, void *v)
}
struct seq_operations partitions_op = {
start: part_start,
next: part_next,
stop: part_stop,
show: show_partition
.start =part_start,
.next = part_next,
.stop = part_stop,
.show = show_partition
};
#endif
......
......@@ -137,15 +137,15 @@ static int xor_status(struct loop_device *lo, struct loop_info *info)
}
struct loop_func_table none_funcs = {
number: LO_CRYPT_NONE,
transfer: transfer_none,
init: none_status,
.number = LO_CRYPT_NONE,
.transfer = transfer_none,
.init = none_status,
};
struct loop_func_table xor_funcs = {
number: LO_CRYPT_XOR,
transfer: transfer_xor,
init: xor_status
.number = LO_CRYPT_XOR,
.transfer = transfer_xor,
.init = xor_status
};
/* 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)
}
static struct block_device_operations lo_fops = {
owner: THIS_MODULE,
open: lo_open,
release: lo_release,
ioctl: lo_ioctl,
.owner = THIS_MODULE,
.open = lo_open,
.release = lo_release,
.ioctl = lo_ioctl,
};
/*
......
......@@ -466,10 +466,10 @@ static int nbd_release(struct inode *inode, struct file *file)
static struct block_device_operations nbd_fops =
{
owner: THIS_MODULE,
open: nbd_open,
release: nbd_release,
ioctl: nbd_ioctl,
.owner = THIS_MODULE,
.open = nbd_open,
.release = nbd_release,
.ioctl = nbd_ioctl,
};
/*
......
......@@ -254,11 +254,11 @@ static char pg_scratch[512]; /* scratch block buffer */
/* kernel glue structures */
static struct file_operations pg_fops = {
owner: THIS_MODULE,
read: pg_read,
write: pg_write,
open: pg_open,
release: pg_release,
.owner = THIS_MODULE,
.read = pg_read,
.write = pg_write,
.open = pg_open,
.release = pg_release,
};
void pg_init_units( void )
......
......@@ -256,12 +256,12 @@ static char pt_scratch[512]; /* scratch block buffer */
/* kernel glue structures */
static struct file_operations pt_fops = {
owner: THIS_MODULE,
read: pt_read,
write: pt_write,
ioctl: pt_ioctl,
open: pt_open,
release: pt_release,
.owner = THIS_MODULE,
.read = pt_read,
.write = pt_write,
.ioctl = pt_ioctl,
.open = pt_open,
.release = pt_release,
};
void pt_init_units( void )
......
......@@ -107,7 +107,7 @@ static DECLARE_WAIT_QUEUE_HEAD(ps2esdi_int);
static int no_int_yet;
static int ps2esdi_drives;
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 ps2esdi_slot = -1;
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
}
static struct address_space_operations ramdisk_aops = {
readpage: ramdisk_readpage,
writepage: fail_writepage,
prepare_write: ramdisk_prepare_write,
commit_write: ramdisk_commit_write,
.readpage = ramdisk_readpage,
.writepage = fail_writepage,
.prepare_write = ramdisk_prepare_write,
.commit_write = ramdisk_commit_write,
};
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)
static struct file_operations initrd_fops = {
read: initrd_read,
release: initrd_release,
.read = initrd_read,
.release = initrd_release,
};
#endif
......@@ -361,9 +361,9 @@ static int rd_open(struct inode * inode, struct file * filp)
}
static struct block_device_operations rd_bd_op = {
owner: THIS_MODULE,
open: rd_open,
ioctl: rd_ioctl,
.owner = THIS_MODULE,
.open = rd_open,
.ioctl = rd_ioctl,
};
/* Before freeing the module, invalidate all of the protected buffers! */
......
......@@ -1117,18 +1117,18 @@ static void mm_pci_remove(struct pci_dev *dev)
}
static const struct pci_device_id __devinitdata mm_pci_ids[] = { {
vendor: PCI_VENDOR_ID_MICRO_MEMORY,
device: PCI_DEVICE_ID_MICRO_MEMORY_5415CN,
.vendor = PCI_VENDOR_ID_MICRO_MEMORY,
.device = PCI_DEVICE_ID_MICRO_MEMORY_5415CN,
}, { /* end: all zeroes */ }
};
MODULE_DEVICE_TABLE(pci, mm_pci_ids);
static struct pci_driver mm_pci_driver = {
name: "umem",
id_table: mm_pci_ids,
probe: mm_pci_probe,
remove: mm_pci_remove,
.name = "umem",
.id_table = mm_pci_ids,
.probe = mm_pci_probe,
.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