diff options
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r-- | drivers/ata/libata-core.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index ddf8e4862787..4f78741692dc 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -98,8 +98,6 @@ static unsigned long ata_dev_blacklisted(const struct ata_device *dev); | |||
98 | 98 | ||
99 | unsigned int ata_print_id = 1; | 99 | unsigned int ata_print_id = 1; |
100 | 100 | ||
101 | struct workqueue_struct *ata_aux_wq; | ||
102 | |||
103 | struct ata_force_param { | 101 | struct ata_force_param { |
104 | const char *name; | 102 | const char *name; |
105 | unsigned int cbl; | 103 | unsigned int cbl; |
@@ -5611,6 +5609,7 @@ struct ata_port *ata_port_alloc(struct ata_host *host) | |||
5611 | ap->msg_enable = ATA_MSG_DRV | ATA_MSG_ERR | ATA_MSG_WARN; | 5609 | ap->msg_enable = ATA_MSG_DRV | ATA_MSG_ERR | ATA_MSG_WARN; |
5612 | #endif | 5610 | #endif |
5613 | 5611 | ||
5612 | mutex_init(&ap->scsi_scan_mutex); | ||
5614 | INIT_DELAYED_WORK(&ap->hotplug_task, ata_scsi_hotplug); | 5613 | INIT_DELAYED_WORK(&ap->hotplug_task, ata_scsi_hotplug); |
5615 | INIT_WORK(&ap->scsi_rescan_task, ata_scsi_dev_rescan); | 5614 | INIT_WORK(&ap->scsi_rescan_task, ata_scsi_dev_rescan); |
5616 | INIT_LIST_HEAD(&ap->eh_done_q); | 5615 | INIT_LIST_HEAD(&ap->eh_done_q); |
@@ -6549,29 +6548,20 @@ static int __init ata_init(void) | |||
6549 | 6548 | ||
6550 | ata_parse_force_param(); | 6549 | ata_parse_force_param(); |
6551 | 6550 | ||
6552 | ata_aux_wq = create_singlethread_workqueue("ata_aux"); | ||
6553 | if (!ata_aux_wq) | ||
6554 | goto fail; | ||
6555 | |||
6556 | rc = ata_sff_init(); | 6551 | rc = ata_sff_init(); |
6557 | if (rc) | 6552 | if (rc) { |
6558 | goto fail; | 6553 | kfree(ata_force_tbl); |
6554 | return rc; | ||
6555 | } | ||
6559 | 6556 | ||
6560 | printk(KERN_DEBUG "libata version " DRV_VERSION " loaded.\n"); | 6557 | printk(KERN_DEBUG "libata version " DRV_VERSION " loaded.\n"); |
6561 | return 0; | 6558 | return 0; |
6562 | |||
6563 | fail: | ||
6564 | kfree(ata_force_tbl); | ||
6565 | if (ata_aux_wq) | ||
6566 | destroy_workqueue(ata_aux_wq); | ||
6567 | return rc; | ||
6568 | } | 6559 | } |
6569 | 6560 | ||
6570 | static void __exit ata_exit(void) | 6561 | static void __exit ata_exit(void) |
6571 | { | 6562 | { |
6572 | ata_sff_exit(); | 6563 | ata_sff_exit(); |
6573 | kfree(ata_force_tbl); | 6564 | kfree(ata_force_tbl); |
6574 | destroy_workqueue(ata_aux_wq); | ||
6575 | } | 6565 | } |
6576 | 6566 | ||
6577 | subsys_initcall(ata_init); | 6567 | subsys_initcall(ata_init); |