aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/ata_piix.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-09-05 05:20:33 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-09-05 05:20:33 -0400
commitd0bd99299bf933ae006d2dc6a31ffcba482ae3f2 (patch)
tree62615ed8bc6ab68f42b59d412a7fd7ac77c79803 /drivers/scsi/ata_piix.c
parent6f1062330499cee10396bf3fc66a03eb228c5fad (diff)
parent586a4ac509b041df55f26c2b26cd7cbdaf9b045d (diff)
/spare/repo/libata-dev branch 'iomap-try3'
Diffstat (limited to 'drivers/scsi/ata_piix.c')
-rw-r--r--drivers/scsi/ata_piix.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c
index fb28c126184..deec0cef88d 100644
--- a/drivers/scsi/ata_piix.c
+++ b/drivers/scsi/ata_piix.c
@@ -583,8 +583,7 @@ static void pci_enable_intx(struct pci_dev *pdev)
#define AHCI_ENABLE (1 << 31)
static int piix_disable_ahci(struct pci_dev *pdev)
{
- void *mmio;
- unsigned long addr;
+ void __iomem *mmio;
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;
}