diff options
Diffstat (limited to 'drivers/scsi/ahci.c')
-rw-r--r-- | drivers/scsi/ahci.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c index 4cfb257a0f67..31065261de8e 100644 --- a/drivers/scsi/ahci.c +++ b/drivers/scsi/ahci.c | |||
@@ -995,8 +995,7 @@ static int ahci_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
995 | probe_ent->dev = pci_dev_to_dev(pdev); | 995 | probe_ent->dev = pci_dev_to_dev(pdev); |
996 | INIT_LIST_HEAD(&probe_ent->node); | 996 | INIT_LIST_HEAD(&probe_ent->node); |
997 | 997 | ||
998 | mmio_base = ioremap(pci_resource_start(pdev, AHCI_PCI_BAR), | 998 | mmio_base = pci_iomap(pdev, AHCI_PCI_BAR, 0); |
999 | pci_resource_len(pdev, AHCI_PCI_BAR)); | ||
1000 | if (mmio_base == NULL) { | 999 | if (mmio_base == NULL) { |
1001 | rc = -ENOMEM; | 1000 | rc = -ENOMEM; |
1002 | goto err_out_free_ent; | 1001 | goto err_out_free_ent; |
@@ -1040,7 +1039,7 @@ static int ahci_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1040 | err_out_hpriv: | 1039 | err_out_hpriv: |
1041 | kfree(hpriv); | 1040 | kfree(hpriv); |
1042 | err_out_iounmap: | 1041 | err_out_iounmap: |
1043 | iounmap(mmio_base); | 1042 | pci_iounmap(pdev, mmio_base); |
1044 | err_out_free_ent: | 1043 | err_out_free_ent: |
1045 | kfree(probe_ent); | 1044 | kfree(probe_ent); |
1046 | err_out_msi: | 1045 | err_out_msi: |
@@ -1081,7 +1080,7 @@ static void ahci_remove_one (struct pci_dev *pdev) | |||
1081 | } | 1080 | } |
1082 | 1081 | ||
1083 | kfree(hpriv); | 1082 | kfree(hpriv); |
1084 | iounmap(host_set->mmio_base); | 1083 | pci_iounmap(pdev, host_set->mmio_base); |
1085 | kfree(host_set); | 1084 | kfree(host_set); |
1086 | 1085 | ||
1087 | if (have_msi) | 1086 | if (have_msi) |