aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/scc_pata.c10
-rw-r--r--drivers/ide/siimage.c2
2 files changed, 5 insertions, 7 deletions
diff --git a/drivers/ide/scc_pata.c b/drivers/ide/scc_pata.c
index 49f163aa51e3..f26aa5d54efb 100644
--- a/drivers/ide/scc_pata.c
+++ b/drivers/ide/scc_pata.c
@@ -536,10 +536,6 @@ static u8 scc_udma_filter(ide_drive_t *drive)
536 536
537static int setup_mmio_scc (struct pci_dev *dev, const char *name) 537static int setup_mmio_scc (struct pci_dev *dev, const char *name)
538{ 538{
539 unsigned long ctl_base = pci_resource_start(dev, 0);
540 unsigned long dma_base = pci_resource_start(dev, 1);
541 unsigned long ctl_size = pci_resource_len(dev, 0);
542 unsigned long dma_size = pci_resource_len(dev, 1);
543 void __iomem *ctl_addr; 539 void __iomem *ctl_addr;
544 void __iomem *dma_addr; 540 void __iomem *dma_addr;
545 int i, ret; 541 int i, ret;
@@ -557,10 +553,12 @@ static int setup_mmio_scc (struct pci_dev *dev, const char *name)
557 return ret; 553 return ret;
558 } 554 }
559 555
560 if ((ctl_addr = ioremap(ctl_base, ctl_size)) == NULL) 556 ctl_addr = pci_ioremap_bar(dev, 0);
557 if (!ctl_addr)
561 goto fail_0; 558 goto fail_0;
562 559
563 if ((dma_addr = ioremap(dma_base, dma_size)) == NULL) 560 dma_addr = pci_ioremap_bar(dev, 1);
561 if (!dma_addr)
564 goto fail_1; 562 goto fail_1;
565 563
566 pci_set_master(dev); 564 pci_set_master(dev);
diff --git a/drivers/ide/siimage.c b/drivers/ide/siimage.c
index eb4faf92c571..c3107df7773d 100644
--- a/drivers/ide/siimage.c
+++ b/drivers/ide/siimage.c
@@ -784,7 +784,7 @@ static int __devinit siimage_init_one(struct pci_dev *dev,
784 printk(KERN_WARNING DRV_NAME " %s: MMIO ports not " 784 printk(KERN_WARNING DRV_NAME " %s: MMIO ports not "
785 "available\n", pci_name(dev)); 785 "available\n", pci_name(dev));
786 } else { 786 } else {
787 ioaddr = ioremap(bar5, barsize); 787 ioaddr = pci_ioremap_bar(dev, 5);
788 if (ioaddr == NULL) 788 if (ioaddr == NULL)
789 release_mem_region(bar5, barsize); 789 release_mem_region(bar5, barsize);
790 } 790 }