aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r--drivers/ata/libata-core.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index a0a4d6968400..4972fdf4bd31 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
99unsigned int ata_print_id = 1; 99unsigned int ata_print_id = 1;
100 100
101struct workqueue_struct *ata_aux_wq;
102
103struct ata_force_param { 101struct ata_force_param {
104 const char *name; 102 const char *name;
105 unsigned int cbl; 103 unsigned int cbl;
@@ -5594,6 +5592,7 @@ struct ata_port *ata_port_alloc(struct ata_host *host)
5594 ap->msg_enable = ATA_MSG_DRV | ATA_MSG_ERR | ATA_MSG_WARN; 5592 ap->msg_enable = ATA_MSG_DRV | ATA_MSG_ERR | ATA_MSG_WARN;
5595#endif 5593#endif
5596 5594
5595 mutex_init(&ap->scsi_scan_mutex);
5597 INIT_DELAYED_WORK(&ap->hotplug_task, ata_scsi_hotplug); 5596 INIT_DELAYED_WORK(&ap->hotplug_task, ata_scsi_hotplug);
5598 INIT_WORK(&ap->scsi_rescan_task, ata_scsi_dev_rescan); 5597 INIT_WORK(&ap->scsi_rescan_task, ata_scsi_dev_rescan);
5599 INIT_LIST_HEAD(&ap->eh_done_q); 5598 INIT_LIST_HEAD(&ap->eh_done_q);
@@ -6532,29 +6531,20 @@ static int __init ata_init(void)
6532 6531
6533 ata_parse_force_param(); 6532 ata_parse_force_param();
6534 6533
6535 ata_aux_wq = create_singlethread_workqueue("ata_aux");
6536 if (!ata_aux_wq)
6537 goto fail;
6538
6539 rc = ata_sff_init(); 6534 rc = ata_sff_init();
6540 if (rc) 6535 if (rc) {
6541 goto fail; 6536 kfree(ata_force_tbl);
6537 return rc;
6538 }
6542 6539
6543 printk(KERN_DEBUG "libata version " DRV_VERSION " loaded.\n"); 6540 printk(KERN_DEBUG "libata version " DRV_VERSION " loaded.\n");
6544 return 0; 6541 return 0;
6545
6546fail:
6547 kfree(ata_force_tbl);
6548 if (ata_aux_wq)
6549 destroy_workqueue(ata_aux_wq);
6550 return rc;
6551} 6542}
6552 6543
6553static void __exit ata_exit(void) 6544static void __exit ata_exit(void)
6554{ 6545{
6555 ata_sff_exit(); 6546 ata_sff_exit();
6556 kfree(ata_force_tbl); 6547 kfree(ata_force_tbl);
6557 destroy_workqueue(ata_aux_wq);
6558} 6548}
6559 6549
6560subsys_initcall(ata_init); 6550subsys_initcall(ata_init);