Skip to contentSkip to conversation

ide: move ide_setup_dma() call out from ->init_dma method

PATCH In review Bartlomiej Zolnierkiewicz 2 participants 2 messages Mar 8, 2008 – Mar 9, 2008 libata

lore
Share & tools
lore
#0 lore raw

PATCH 4/7 ide: move ide_setup_dma() call out from ->init_dma method

There should be no functional changes caused by this patch.

---
 drivers/ide/pci/alim15x3.c |    1 -
 drivers/ide/pci/hpt366.c   |    2 --
 drivers/ide/setup-pci.c    |    7 +++----
 3 files changed, 3 insertions(+), 7 deletions(-)
drivers/ide/pci/alim15x3.c +0 -1
Index: b/drivers/ide/pci/alim15x3.c
===================================================================
@@ -734,7 +734,6 @@ static void __devinit init_dma_ali15x3 (
 {
 	if (!hwif->channel)
 		outb(inb(dmabase + 2) & 0x60, dmabase + 2);
-	ide_setup_dma(hwif, dmabase);
 }
 
 static const struct ide_port_ops ali_port_ops = {
drivers/ide/pci/hpt366.c +0 -2
Index: b/drivers/ide/pci/hpt366.c
===================================================================
@@ -1348,8 +1348,6 @@ static void __devinit init_dma_hpt366(id
 		outb(dma_new, dmabase + 2);
 
 	local_irq_restore(flags);
-
-	ide_setup_dma(hwif, dmabase);
 }
 
 static void __devinit hpt374_init(struct pci_dev *dev, struct pci_dev *dev2)
drivers/ide/setup-pci.c +3 -4
Index: b/drivers/ide/setup-pci.c
===================================================================
@@ -360,11 +360,10 @@ void ide_hwif_setup_dma(ide_hwif_t *hwif
 			}
 		}
 		if (dma_base) {
-			if (d->init_dma) {
+			if (d->init_dma)
 				d->init_dma(hwif, dma_base);
-			} else {
-				ide_setup_dma(hwif, dma_base);
-			}
+
+			ide_setup_dma(hwif, dma_base);
 		} else {
 			printk(KERN_INFO "%s: %s Bus-Master DMA disabled "
 				"(BIOS)\n", hwif->name, d->name);