Commit df5c1aca authored by Art Haas's avatar Art Haas Committed by Linus Torvalds

[PATCH] named initializers for drivers/ide

parent 2d2a505b
...@@ -2563,26 +2563,26 @@ void ide_cdrom_release_real (struct cdrom_device_info *cdi) ...@@ -2563,26 +2563,26 @@ void ide_cdrom_release_real (struct cdrom_device_info *cdi)
* Device initialization. * Device initialization.
*/ */
static struct cdrom_device_ops ide_cdrom_dops = { static struct cdrom_device_ops ide_cdrom_dops = {
open: ide_cdrom_open_real, .open = ide_cdrom_open_real,
release: ide_cdrom_release_real, .release = ide_cdrom_release_real,
drive_status: ide_cdrom_drive_status, .drive_status = ide_cdrom_drive_status,
media_changed: ide_cdrom_check_media_change_real, .media_changed = ide_cdrom_check_media_change_real,
tray_move: ide_cdrom_tray_move, .tray_move = ide_cdrom_tray_move,
lock_door: ide_cdrom_lock_door, .lock_door = ide_cdrom_lock_door,
select_speed: ide_cdrom_select_speed, .select_speed = ide_cdrom_select_speed,
get_last_session: ide_cdrom_get_last_session, .get_last_session = ide_cdrom_get_last_session,
get_mcn: ide_cdrom_get_mcn, .get_mcn = ide_cdrom_get_mcn,
reset: ide_cdrom_reset, .reset = ide_cdrom_reset,
audio_ioctl: ide_cdrom_audio_ioctl, .audio_ioctl = ide_cdrom_audio_ioctl,
dev_ioctl: ide_cdrom_dev_ioctl, .dev_ioctl = ide_cdrom_dev_ioctl,
capability: CDC_CLOSE_TRAY | CDC_OPEN_TRAY | CDC_LOCK | .capability = CDC_CLOSE_TRAY | CDC_OPEN_TRAY | CDC_LOCK |
CDC_SELECT_SPEED | CDC_SELECT_DISC | CDC_SELECT_SPEED | CDC_SELECT_DISC |
CDC_MULTI_SESSION | CDC_MCN | CDC_MULTI_SESSION | CDC_MCN |
CDC_MEDIA_CHANGED | CDC_PLAY_AUDIO | CDC_RESET | CDC_MEDIA_CHANGED | CDC_PLAY_AUDIO | CDC_RESET |
CDC_IOCTLS | CDC_DRIVE_STATUS | CDC_CD_R | CDC_IOCTLS | CDC_DRIVE_STATUS | CDC_CD_R |
CDC_CD_RW | CDC_DVD | CDC_DVD_R| CDC_DVD_RAM | CDC_CD_RW | CDC_DVD | CDC_DVD_R| CDC_DVD_RAM |
CDC_GENERIC_PACKET, CDC_GENERIC_PACKET,
generic_packet: ide_cdrom_packet, .generic_packet = ide_cdrom_packet,
}; };
static int ide_cdrom_register (ide_drive_t *drive, int nslots) static int ide_cdrom_register (ide_drive_t *drive, int nslots)
...@@ -3048,39 +3048,39 @@ int ide_cdrom_cleanup(ide_drive_t *drive) ...@@ -3048,39 +3048,39 @@ int ide_cdrom_cleanup(ide_drive_t *drive)
static int ide_cdrom_attach (ide_drive_t *drive); static int ide_cdrom_attach (ide_drive_t *drive);
static ide_driver_t ide_cdrom_driver = { static ide_driver_t ide_cdrom_driver = {
owner: THIS_MODULE, .owner = THIS_MODULE,
name: "ide-cdrom", .name = "ide-cdrom",
version: IDECD_VERSION, .version = IDECD_VERSION,
media: ide_cdrom, .media = ide_cdrom,
busy: 0, .busy = 0,
#ifdef CONFIG_IDEDMA_ONLYDISK #ifdef CONFIG_IDEDMA_ONLYDISK
supports_dma: 0, .supports_dma = 0,
#else #else
supports_dma: 1, .supports_dma = 1,
#endif #endif
supports_dsc_overlap: 1, .supports_dsc_overlap = 1,
cleanup: ide_cdrom_cleanup, .cleanup = ide_cdrom_cleanup,
standby: NULL, .standby = NULL,
suspend: NULL, .suspend = NULL,
resume: NULL, .resume = NULL,
flushcache: NULL, .flushcache = NULL,
do_request: ide_do_rw_cdrom, .do_request = ide_do_rw_cdrom,
end_request: NULL, .end_request = NULL,
sense: ide_cdrom_dump_status, .sense = ide_cdrom_dump_status,
error: ide_cdrom_error, .error = ide_cdrom_error,
ioctl: ide_cdrom_ioctl, .ioctl = ide_cdrom_ioctl,
open: ide_cdrom_open, .open = ide_cdrom_open,
release: ide_cdrom_release, .release = ide_cdrom_release,
media_change: ide_cdrom_check_media_change, .media_change = ide_cdrom_check_media_change,
revalidate: ide_cdrom_revalidate, .revalidate = ide_cdrom_revalidate,
pre_reset: NULL, .pre_reset = NULL,
capacity: ide_cdrom_capacity, .capacity = ide_cdrom_capacity,
special: NULL, .special = NULL,
proc: NULL, .proc = NULL,
attach: ide_cdrom_attach, .attach = ide_cdrom_attach,
ata_prebuilder: NULL, .ata_prebuilder = NULL,
atapi_prebuilder: NULL, .atapi_prebuilder = NULL,
drives: LIST_HEAD_INIT(ide_cdrom_driver.drives), .drives = LIST_HEAD_INIT(ide_cdrom_driver.drives),
}; };
/* options */ /* options */
......
...@@ -1709,35 +1709,35 @@ static int idedisk_attach(ide_drive_t *drive); ...@@ -1709,35 +1709,35 @@ static int idedisk_attach(ide_drive_t *drive);
* IDE subdriver functions, registered with ide.c * IDE subdriver functions, registered with ide.c
*/ */
static ide_driver_t idedisk_driver = { static ide_driver_t idedisk_driver = {
owner: THIS_MODULE, .owner = THIS_MODULE,
name: "ide-disk", .name = "ide-disk",
version: IDEDISK_VERSION, .version = IDEDISK_VERSION,
media: ide_disk, .media = ide_disk,
busy: 0, .busy = 0,
supports_dma: 1, .supports_dma = 1,
supports_dsc_overlap: 0, .supports_dsc_overlap = 0,
cleanup: idedisk_cleanup, .cleanup = idedisk_cleanup,
standby: do_idedisk_standby, .standby = do_idedisk_standby,
suspend: do_idedisk_suspend, .suspend = do_idedisk_suspend,
resume: do_idedisk_resume, .resume = do_idedisk_resume,
flushcache: do_idedisk_flushcache, .flushcache = do_idedisk_flushcache,
do_request: do_rw_disk, .do_request = do_rw_disk,
end_request: NULL, .end_request = NULL,
sense: idedisk_dump_status, .sense = idedisk_dump_status,
error: idedisk_error, .error = idedisk_error,
ioctl: idedisk_ioctl, .ioctl = idedisk_ioctl,
open: idedisk_open, .open = idedisk_open,
release: idedisk_release, .release = idedisk_release,
media_change: idedisk_media_change, .media_change = idedisk_media_change,
revalidate: idedisk_revalidate, .revalidate = idedisk_revalidate,
pre_reset: idedisk_pre_reset, .pre_reset = idedisk_pre_reset,
capacity: idedisk_capacity, .capacity = idedisk_capacity,
special: idedisk_special, .special = idedisk_special,
proc: idedisk_proc, .proc = idedisk_proc,
attach: idedisk_attach, .attach = idedisk_attach,
ata_prebuilder: NULL, .ata_prebuilder = NULL,
atapi_prebuilder: NULL, .atapi_prebuilder = NULL,
drives: LIST_HEAD_INIT(idedisk_driver.drives), .drives = LIST_HEAD_INIT(idedisk_driver.drives),
}; };
MODULE_DESCRIPTION("ATA DISK Driver"); MODULE_DESCRIPTION("ATA DISK Driver");
......
...@@ -2042,39 +2042,39 @@ static int idefloppy_attach(ide_drive_t *drive); ...@@ -2042,39 +2042,39 @@ static int idefloppy_attach(ide_drive_t *drive);
* IDE subdriver functions, registered with ide.c * IDE subdriver functions, registered with ide.c
*/ */
static ide_driver_t idefloppy_driver = { static ide_driver_t idefloppy_driver = {
owner: THIS_MODULE, .owner = THIS_MODULE,
name: "ide-floppy", .name = "ide-floppy",
version: IDEFLOPPY_VERSION, .version = IDEFLOPPY_VERSION,
media: ide_floppy, .media = ide_floppy,
busy: 0, .busy = 0,
#ifdef CONFIG_IDEDMA_ONLYDISK #ifdef CONFIG_IDEDMA_ONLYDISK
supports_dma: 0, .supports_dma = 0,
#else #else
supports_dma: 1, .supports_dma = 1,
#endif #endif
supports_dsc_overlap: 0, .supports_dsc_overlap = 0,
cleanup: idefloppy_cleanup, .cleanup = idefloppy_cleanup,
standby: NULL, .standby = NULL,
suspend: NULL, .suspend = NULL,
resume: NULL, .resume = NULL,
flushcache: NULL, .flushcache = NULL,
do_request: idefloppy_do_request, .do_request = idefloppy_do_request,
end_request: idefloppy_do_end_request, .end_request = idefloppy_do_end_request,
sense: NULL, .sense = NULL,
error: NULL, .error = NULL,
ioctl: idefloppy_ioctl, .ioctl = idefloppy_ioctl,
open: idefloppy_open, .open = idefloppy_open,
release: idefloppy_release, .release = idefloppy_release,
media_change: idefloppy_media_change, .media_change = idefloppy_media_change,
revalidate: idefloppy_revalidate, .revalidate = idefloppy_revalidate,
pre_reset: NULL, .pre_reset = NULL,
capacity: idefloppy_capacity, .capacity = idefloppy_capacity,
special: NULL, .special = NULL,
proc: idefloppy_proc, .proc = idefloppy_proc,
attach: idefloppy_attach, .attach = idefloppy_attach,
ata_prebuilder: NULL, .ata_prebuilder = NULL,
atapi_prebuilder: NULL, .atapi_prebuilder = NULL,
drives: LIST_HEAD_INIT(idefloppy_driver.drives), .drives = LIST_HEAD_INIT(idefloppy_driver.drives),
}; };
static int idefloppy_attach (ide_drive_t *drive) static int idefloppy_attach (ide_drive_t *drive)
......
...@@ -851,10 +851,10 @@ static int ide_drivers_open(struct inode *inode, struct file *file) ...@@ -851,10 +851,10 @@ static int ide_drivers_open(struct inode *inode, struct file *file)
return seq_open(file, &ide_drivers_op); return seq_open(file, &ide_drivers_op);
} }
static struct file_operations ide_drivers_operations = { static struct file_operations ide_drivers_operations = {
open: ide_drivers_open, .open = ide_drivers_open,
read: seq_read, .read = seq_read,
llseek: seq_lseek, .llseek = seq_lseek,
release: seq_release, .release = seq_release,
}; };
void proc_ide_create(void) void proc_ide_create(void)
......
...@@ -6184,51 +6184,51 @@ static int idetape_attach(ide_drive_t *drive); ...@@ -6184,51 +6184,51 @@ static int idetape_attach(ide_drive_t *drive);
* IDE subdriver functions, registered with ide.c * IDE subdriver functions, registered with ide.c
*/ */
static ide_driver_t idetape_driver = { static ide_driver_t idetape_driver = {
owner: THIS_MODULE, .owner = THIS_MODULE,
name: "ide-tape", .name = "ide-tape",
version: IDETAPE_VERSION, .version = IDETAPE_VERSION,
media: ide_tape, .media = ide_tape,
busy: 1, .busy = 1,
#ifdef CONFIG_IDEDMA_ONLYDISK #ifdef CONFIG_IDEDMA_ONLYDISK
supports_dma: 0, .supports_dma = 0,
#else #else
supports_dma: 1, .supports_dma = 1,
#endif #endif
supports_dsc_overlap: 1, .supports_dsc_overlap = 1,
cleanup: idetape_cleanup, .cleanup = idetape_cleanup,
standby: NULL, .standby = NULL,
suspend: NULL, .suspend = NULL,
resume: NULL, .resume = NULL,
flushcache: NULL, .flushcache = NULL,
do_request: idetape_do_request, .do_request = idetape_do_request,
end_request: idetape_end_request, .end_request = idetape_end_request,
sense: NULL, .sense = NULL,
error: NULL, .error = NULL,
ioctl: idetape_blkdev_ioctl, .ioctl = idetape_blkdev_ioctl,
open: idetape_blkdev_open, .open = idetape_blkdev_open,
release: idetape_blkdev_release, .release = idetape_blkdev_release,
media_change: NULL, .media_change = NULL,
revalidate: NULL, .revalidate = NULL,
pre_reset: idetape_pre_reset, .pre_reset = idetape_pre_reset,
capacity: NULL, .capacity = NULL,
special: NULL, .special = NULL,
proc: idetape_proc, .proc = idetape_proc,
attach: idetape_attach, .attach = idetape_attach,
ata_prebuilder: NULL, .ata_prebuilder = NULL,
atapi_prebuilder: NULL, .atapi_prebuilder = NULL,
drives: LIST_HEAD_INIT(idetape_driver.drives), .drives = LIST_HEAD_INIT(idetape_driver.drives),
}; };
/* /*
* Our character device supporting functions, passed to register_chrdev. * Our character device supporting functions, passed to register_chrdev.
*/ */
static struct file_operations idetape_fops = { static struct file_operations idetape_fops = {
owner: THIS_MODULE, .owner = THIS_MODULE,
read: idetape_chrdev_read, .read = idetape_chrdev_read,
write: idetape_chrdev_write, .write = idetape_chrdev_write,
ioctl: idetape_chrdev_ioctl, .ioctl = idetape_chrdev_ioctl,
open: idetape_chrdev_open, .open = idetape_chrdev_open,
release: idetape_chrdev_release, .release = idetape_chrdev_release,
}; };
static int idetape_attach (ide_drive_t *drive) static int idetape_attach (ide_drive_t *drive)
......
...@@ -1689,10 +1689,10 @@ static int show_driver(struct seq_file *m, void *v) ...@@ -1689,10 +1689,10 @@ static int show_driver(struct seq_file *m, void *v)
return 0; return 0;
} }
struct seq_operations ide_drivers_op = { struct seq_operations ide_drivers_op = {
start: m_start, .start = m_start,
next: m_next, .next = m_next,
stop: m_stop, .stop = m_stop,
show: show_driver .show = show_driver
}; };
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
...@@ -3446,12 +3446,12 @@ void ide_unregister_driver(ide_driver_t *driver) ...@@ -3446,12 +3446,12 @@ void ide_unregister_driver(ide_driver_t *driver)
EXPORT_SYMBOL(ide_unregister_driver); EXPORT_SYMBOL(ide_unregister_driver);
struct block_device_operations ide_fops[] = {{ struct block_device_operations ide_fops[] = {{
owner: THIS_MODULE, .owner = THIS_MODULE,
open: ide_open, .open = ide_open,
release: ide_release, .release = ide_release,
ioctl: ide_ioctl, .ioctl = ide_ioctl,
check_media_change: ide_check_media_change, .check_media_change = ide_check_media_change,
revalidate: ide_revalidate_disk .revalidate = ide_revalidate_disk
}}; }};
EXPORT_SYMBOL(ide_fops); EXPORT_SYMBOL(ide_fops);
......
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