aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ahci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/ahci.c')
-rw-r--r--drivers/scsi/ahci.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
index afb3805f9e95..60f455bf3696 100644
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -1389,21 +1389,17 @@ static void ahci_remove_one (struct pci_dev *pdev)
1389 struct device *dev = pci_dev_to_dev(pdev); 1389 struct device *dev = pci_dev_to_dev(pdev);
1390 struct ata_host_set *host_set = dev_get_drvdata(dev); 1390 struct ata_host_set *host_set = dev_get_drvdata(dev);
1391 struct ahci_host_priv *hpriv = host_set->private_data; 1391 struct ahci_host_priv *hpriv = host_set->private_data;
1392 struct ata_port *ap;
1393 unsigned int i; 1392 unsigned int i;
1394 int have_msi; 1393 int have_msi;
1395 1394
1396 for (i = 0; i < host_set->n_ports; i++) { 1395 for (i = 0; i < host_set->n_ports; i++)
1397 ap = host_set->ports[i]; 1396 ata_port_detach(host_set->ports[i]);
1398
1399 scsi_remove_host(ap->host);
1400 }
1401 1397
1402 have_msi = hpriv->flags & AHCI_FLAG_MSI; 1398 have_msi = hpriv->flags & AHCI_FLAG_MSI;
1403 free_irq(host_set->irq, host_set); 1399 free_irq(host_set->irq, host_set);
1404 1400
1405 for (i = 0; i < host_set->n_ports; i++) { 1401 for (i = 0; i < host_set->n_ports; i++) {
1406 ap = host_set->ports[i]; 1402 struct ata_port *ap = host_set->ports[i];
1407 1403
1408 ata_scsi_release(ap->host); 1404 ata_scsi_release(ap->host);
1409 scsi_host_put(ap->host); 1405 scsi_host_put(ap->host);