summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ata_piix.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-08-30 05:42:52 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-08-30 05:42:52 -0400
commit374b1873571bf80dc0c1fcceaaad067980f3b9de (patch)
treed53352d9fed18984e48cf734a1036ff8fbef856f /drivers/scsi/ata_piix.c
parentea6ba10bbb88e106f9e2db7dc253993bb3bbbe3b (diff)
downloadlinux-374b1873571bf80dc0c1fcceaaad067980f3b9de.tar.bz2
[libata] update several drivers to use pci_iomap()/pci_iounmap()
Diffstat (limited to 'drivers/scsi/ata_piix.c')
-rw-r--r--drivers/scsi/ata_piix.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c
index 90c53b88a1ee..deec0cef88d9 100644
--- a/drivers/scsi/ata_piix.c
+++ b/drivers/scsi/ata_piix.c
@@ -584,7 +584,6 @@ static void pci_enable_intx(struct pci_dev *pdev)
static int piix_disable_ahci(struct pci_dev *pdev)
{
void __iomem *mmio;
- unsigned long addr;
u32 tmp;
int rc = 0;
@@ -592,11 +591,11 @@ static int piix_disable_ahci(struct pci_dev *pdev)
* works because this device is usually set up by BIOS.
*/
- addr = pci_resource_start(pdev, AHCI_PCI_BAR);
- if (!addr || !pci_resource_len(pdev, AHCI_PCI_BAR))
+ if (!pci_resource_start(pdev, AHCI_PCI_BAR) ||
+ !pci_resource_len(pdev, AHCI_PCI_BAR))
return 0;
- mmio = ioremap(addr, 64);
+ mmio = pci_iomap(pdev, AHCI_PCI_BAR, 64);
if (!mmio)
return -ENOMEM;
@@ -610,7 +609,7 @@ static int piix_disable_ahci(struct pci_dev *pdev)
rc = -EIO;
}
- iounmap(mmio);
+ pci_iounmap(pdev, mmio);
return rc;
}