diff options
Diffstat (limited to 'drivers/ide/pci/sgiioc4.c')
-rw-r--r-- | drivers/ide/pci/sgiioc4.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c index f6c5ba07be71..8af9b23499fd 100644 --- a/drivers/ide/pci/sgiioc4.c +++ b/drivers/ide/pci/sgiioc4.c | |||
@@ -320,7 +320,6 @@ ide_dma_sgiioc4(ide_hwif_t *hwif, const struct ide_port_info *d) | |||
320 | { | 320 | { |
321 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 321 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
322 | unsigned long dma_base = pci_resource_start(dev, 0) + IOC4_DMA_OFFSET; | 322 | unsigned long dma_base = pci_resource_start(dev, 0) + IOC4_DMA_OFFSET; |
323 | void __iomem *virt_dma_base; | ||
324 | int num_ports = sizeof (ioc4_dma_regs_t); | 323 | int num_ports = sizeof (ioc4_dma_regs_t); |
325 | void *pad; | 324 | void *pad; |
326 | 325 | ||
@@ -333,14 +332,8 @@ ide_dma_sgiioc4(ide_hwif_t *hwif, const struct ide_port_info *d) | |||
333 | return -1; | 332 | return -1; |
334 | } | 333 | } |
335 | 334 | ||
336 | virt_dma_base = ioremap(dma_base, num_ports); | 335 | hwif->dma_base = (unsigned long)hwif->io_ports.irq_addr + |
337 | if (virt_dma_base == NULL) { | 336 | IOC4_DMA_OFFSET; |
338 | printk(KERN_ERR "%s(%s) -- ERROR: unable to map addresses " | ||
339 | "0x%lx to 0x%lx\n", __func__, hwif->name, | ||
340 | dma_base, dma_base + num_ports - 1); | ||
341 | goto dma_remap_failure; | ||
342 | } | ||
343 | hwif->dma_base = (unsigned long) virt_dma_base; | ||
344 | 337 | ||
345 | hwif->sg_max_nents = IOC4_PRD_ENTRIES; | 338 | hwif->sg_max_nents = IOC4_PRD_ENTRIES; |
346 | 339 | ||
@@ -364,9 +357,6 @@ ide_dma_sgiioc4(ide_hwif_t *hwif, const struct ide_port_info *d) | |||
364 | printk(KERN_INFO "%s: changing from DMA to PIO mode", hwif->name); | 357 | printk(KERN_INFO "%s: changing from DMA to PIO mode", hwif->name); |
365 | 358 | ||
366 | dma_pci_alloc_failure: | 359 | dma_pci_alloc_failure: |
367 | iounmap(virt_dma_base); | ||
368 | |||
369 | dma_remap_failure: | ||
370 | release_mem_region(dma_base, num_ports); | 360 | release_mem_region(dma_base, num_ports); |
371 | 361 | ||
372 | return -1; | 362 | return -1; |