diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2008-10-23 23:22:07 +0200 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-23 23:22:07 +0200 |
commit | 1f1ab2745be4afc77446f17dd575a7e5695710fd (patch) | |
tree | cd4ecf9643fae8a884d8ff35987468375763821e /drivers/ide/scc_pata.c | |
parent | 283435621a21679e02088b5abcce7d15d6d2010a (diff) | |
download | kernel_samsung_smdk4412-1f1ab2745be4afc77446f17dd575a7e5695710fd.zip kernel_samsung_smdk4412-1f1ab2745be4afc77446f17dd575a7e5695710fd.tar.gz kernel_samsung_smdk4412-1f1ab2745be4afc77446f17dd575a7e5695710fd.tar.bz2 |
ide: two more pci_ioremap_bar() conversions
based on suggestion from Sergei Shtylyov, there are two more places
where using pci_ioremap_bar() makes sense.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/scc_pata.c')
-rw-r--r-- | drivers/ide/scc_pata.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/ide/scc_pata.c b/drivers/ide/scc_pata.c index 49f163a..f26aa5d 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) static int setup_mmio_scc (struct pci_dev *dev, const char *name) { - unsigned long ctl_base = pci_resource_start(dev, 0); - unsigned long dma_base = pci_resource_start(dev, 1); - unsigned long ctl_size = pci_resource_len(dev, 0); - unsigned long dma_size = pci_resource_len(dev, 1); void __iomem *ctl_addr; void __iomem *dma_addr; int i, ret; @@ -557,10 +553,12 @@ static int setup_mmio_scc (struct pci_dev *dev, const char *name) return ret; } - if ((ctl_addr = ioremap(ctl_base, ctl_size)) == NULL) + ctl_addr = pci_ioremap_bar(dev, 0); + if (!ctl_addr) goto fail_0; - if ((dma_addr = ioremap(dma_base, dma_size)) == NULL) + dma_addr = pci_ioremap_bar(dev, 1); + if (!dma_addr) goto fail_1; pci_set_master(dev); |