diff options
Diffstat (limited to 'drivers/scsi/sata_sx4.c')
| -rw-r--r-- | drivers/scsi/sata_sx4.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/scsi/sata_sx4.c b/drivers/scsi/sata_sx4.c index 38b3dd2d7504..540a85191172 100644 --- a/drivers/scsi/sata_sx4.c +++ b/drivers/scsi/sata_sx4.c | |||
| @@ -245,13 +245,14 @@ static struct pci_driver pdc_sata_pci_driver = { | |||
| 245 | 245 | ||
| 246 | static void pdc20621_host_stop(struct ata_host_set *host_set) | 246 | static void pdc20621_host_stop(struct ata_host_set *host_set) |
| 247 | { | 247 | { |
| 248 | struct pci_dev *pdev = to_pci_dev(host_set->dev); | ||
| 248 | struct pdc_host_priv *hpriv = host_set->private_data; | 249 | struct pdc_host_priv *hpriv = host_set->private_data; |
| 249 | void *dimm_mmio = hpriv->dimm_mmio; | 250 | void *dimm_mmio = hpriv->dimm_mmio; |
| 250 | 251 | ||
| 251 | iounmap(dimm_mmio); | 252 | pci_iounmap(pdev, dimm_mmio); |
| 252 | kfree(hpriv); | 253 | kfree(hpriv); |
| 253 | 254 | ||
| 254 | ata_host_stop(host_set); | 255 | pci_iounmap(pdev, host_set->mmio_base); |
| 255 | } | 256 | } |
| 256 | 257 | ||
| 257 | static int pdc_port_start(struct ata_port *ap) | 258 | static int pdc_port_start(struct ata_port *ap) |
| @@ -1418,8 +1419,7 @@ static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id * | |||
| 1418 | probe_ent->dev = pci_dev_to_dev(pdev); | 1419 | probe_ent->dev = pci_dev_to_dev(pdev); |
| 1419 | INIT_LIST_HEAD(&probe_ent->node); | 1420 | INIT_LIST_HEAD(&probe_ent->node); |
| 1420 | 1421 | ||
| 1421 | mmio_base = ioremap(pci_resource_start(pdev, 3), | 1422 | mmio_base = pci_iomap(pdev, 3, 0); |
| 1422 | pci_resource_len(pdev, 3)); | ||
| 1423 | if (mmio_base == NULL) { | 1423 | if (mmio_base == NULL) { |
| 1424 | rc = -ENOMEM; | 1424 | rc = -ENOMEM; |
| 1425 | goto err_out_free_ent; | 1425 | goto err_out_free_ent; |
| @@ -1433,8 +1433,7 @@ static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id * | |||
| 1433 | } | 1433 | } |
| 1434 | memset(hpriv, 0, sizeof(*hpriv)); | 1434 | memset(hpriv, 0, sizeof(*hpriv)); |
| 1435 | 1435 | ||
| 1436 | dimm_mmio = ioremap(pci_resource_start(pdev, 4), | 1436 | dimm_mmio = pci_iomap(pdev, 4, 0); |
| 1437 | pci_resource_len(pdev, 4)); | ||
| 1438 | if (!dimm_mmio) { | 1437 | if (!dimm_mmio) { |
| 1439 | kfree(hpriv); | 1438 | kfree(hpriv); |
| 1440 | rc = -ENOMEM; | 1439 | rc = -ENOMEM; |
| @@ -1481,9 +1480,9 @@ static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id * | |||
| 1481 | 1480 | ||
| 1482 | err_out_iounmap_dimm: /* only get to this label if 20621 */ | 1481 | err_out_iounmap_dimm: /* only get to this label if 20621 */ |
| 1483 | kfree(hpriv); | 1482 | kfree(hpriv); |
| 1484 | iounmap(dimm_mmio); | 1483 | pci_iounmap(pdev, dimm_mmio); |
| 1485 | err_out_iounmap: | 1484 | err_out_iounmap: |
| 1486 | iounmap(mmio_base); | 1485 | pci_iounmap(pdev, mmio_base); |
| 1487 | err_out_free_ent: | 1486 | err_out_free_ent: |
| 1488 | kfree(probe_ent); | 1487 | kfree(probe_ent); |
| 1489 | err_out_regions: | 1488 | err_out_regions: |
