ide: remove ide_setup_dma()
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Wed, 23 Jul 2008 17:55:51 +0000 (19:55 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Wed, 23 Jul 2008 17:55:51 +0000 (19:55 +0200)
Export sff_dma_ops and then remove ide_setup_dma().

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/arm/palm_bk3710.c
drivers/ide/ide-dma.c
drivers/ide/pci/alim15x3.c
drivers/ide/pci/hpt366.c
drivers/ide/setup-pci.c
include/linux/ide.h

index 023c10753f15296ec213d0e49477f7d441a47254..0229d794d9099534a0c4b2fa70c0ab33796f732c 100644 (file)
@@ -316,15 +316,14 @@ static u8 __devinit palm_bk3710_cable_detect(ide_hwif_t *hwif)
 static int __devinit palm_bk3710_init_dma(ide_hwif_t *hwif,
                                          const struct ide_port_info *d)
 {
-       unsigned long base =
-               hwif->io_ports.data_addr - IDE_PALM_ATA_PRI_REG_OFFSET;
-
        printk(KERN_INFO "    %s: MMIO-DMA\n", hwif->name);
 
        if (ide_allocate_dma_engine(hwif))
                return -1;
 
-       ide_setup_dma(hwif, base);
+       hwif->dma_base = hwif->io_ports.data_addr - IDE_PALM_ATA_PRI_REG_OFFSET;
+
+       hwif->dma_ops = &sff_dma_ops;
 
        return 0;
 }
index d98a9da2699c7bf3f60d821e0d79d112f0f889db..ac342ebf6c54058492a07ca7fda8374de5943701 100644 (file)
@@ -878,7 +878,7 @@ int ide_allocate_dma_engine(ide_hwif_t *hwif)
 }
 EXPORT_SYMBOL_GPL(ide_allocate_dma_engine);
 
-static const struct ide_dma_ops sff_dma_ops = {
+const struct ide_dma_ops sff_dma_ops = {
        .dma_host_set           = ide_dma_host_set,
        .dma_setup              = ide_dma_setup,
        .dma_exec_cmd           = ide_dma_exec_cmd,
@@ -888,13 +888,5 @@ static const struct ide_dma_ops sff_dma_ops = {
        .dma_timeout            = ide_dma_timeout,
        .dma_lost_irq           = ide_dma_lost_irq,
 };
-
-void ide_setup_dma(ide_hwif_t *hwif, unsigned long base)
-{
-       hwif->dma_base = base;
-
-       hwif->dma_ops = &sff_dma_ops;
-}
-
-EXPORT_SYMBOL_GPL(ide_setup_dma);
+EXPORT_SYMBOL_GPL(sff_dma_ops);
 #endif /* CONFIG_BLK_DEV_IDEDMA_SFF */
index 80d19c0eb78097d09cc822cb0ed27273563ce1cf..8015f6f65488df5cfa990ccd7fcfc645e1dcea35 100644 (file)
@@ -483,7 +483,9 @@ static int __devinit init_dma_ali15x3(ide_hwif_t *hwif,
        if (ide_allocate_dma_engine(hwif))
                return -1;
 
-       ide_setup_dma(hwif, base);
+       hwif->dma_base = base;
+
+       hwif->dma_ops = &sff_dma_ops;
 
        return 0;
 }
index d2f470ec80557d776ec26fbc522b12a576dabdb0..201e5ddae9217e77ff274a798ccf89141d9188b7 100644 (file)
@@ -1346,7 +1346,9 @@ static int __devinit init_dma_hpt366(ide_hwif_t *hwif,
        if (ide_allocate_dma_engine(hwif))
                return -1;
 
-       ide_setup_dma(hwif, base);
+       hwif->dma_base = base;
+
+       hwif->dma_ops = &sff_dma_ops;
 
        return 0;
 }
index acb467c6f3459b678a0549b1b6921bdb9652e078..b047013f365226320ec62fcf5fb53015af80de8a 100644 (file)
@@ -377,7 +377,9 @@ int ide_hwif_setup_dma(ide_hwif_t *hwif, const struct ide_port_info *d)
                if (ide_allocate_dma_engine(hwif))
                        return -1;
 
-               ide_setup_dma(hwif, base);
+               hwif->dma_base = base;
+
+               hwif->dma_ops = &sff_dma_ops;
        }
 
        return 0;
index 85a32f472ef033b8ff9e95553463c609b77afbc5..6d774607e32ab34ae8b5fe54e8f31c6894bf353b 100644 (file)
@@ -1007,6 +1007,7 @@ void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *);
 #ifdef CONFIG_BLK_DEV_IDEDMA_PCI
 int ide_pci_set_master(struct pci_dev *, const char *);
 unsigned long ide_pci_dma_base(ide_hwif_t *, const struct ide_port_info *);
+extern const struct ide_dma_ops sff_dma_ops;
 int ide_hwif_setup_dma(ide_hwif_t *, const struct ide_port_info *);
 #else
 static inline int ide_hwif_setup_dma(ide_hwif_t *hwif,
@@ -1164,7 +1165,6 @@ void ide_destroy_dmatable(ide_drive_t *);
 extern int ide_build_dmatable(ide_drive_t *, struct request *);
 int ide_allocate_dma_engine(ide_hwif_t *);
 void ide_release_dma_engine(ide_hwif_t *);
-void ide_setup_dma(ide_hwif_t *, unsigned long);
 
 void ide_dma_host_set(ide_drive_t *, int);
 extern int ide_dma_setup(ide_drive_t *);