]> err.no Git - linux-2.6/commitdiff
ide: constify struct ide_dma_ops
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sat, 26 Apr 2008 20:25:24 +0000 (22:25 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sat, 26 Apr 2008 20:25:24 +0000 (22:25 +0200)
* Export ide_dma_exec_cmd() and __ide_dma_test_irq().

* Constify struct ide_dma_ops.

* Always set hwif->dma_ops to &sff_dma_ops in ide_setup_dma()
  (it is later overriden by ide_init_port() if needed) and drop
  'const struct ide_port_info *d' argument.

While at it:

* Rename __ide_dma_test_irq() to ide_dma_test_irq().

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
21 files changed:
drivers/ide/arm/icside.c
drivers/ide/arm/palm_bk3710.c
drivers/ide/cris/ide-cris.c
drivers/ide/ide-dma.c
drivers/ide/ide-taskfile.c
drivers/ide/mips/au1xxx-ide.c
drivers/ide/pci/alim15x3.c
drivers/ide/pci/cmd64x.c
drivers/ide/pci/cs5520.c
drivers/ide/pci/hpt366.c
drivers/ide/pci/ns87415.c
drivers/ide/pci/pdc202xx_old.c
drivers/ide/pci/sc1200.c
drivers/ide/pci/scc_pata.c
drivers/ide/pci/sgiioc4.c
drivers/ide/pci/sl82c105.c
drivers/ide/pci/tc86c001.c
drivers/ide/pci/trm290.c
drivers/ide/ppc/pmac.c
drivers/ide/setup-pci.c
include/linux/ide.h

index adfeed45f4c02ac06f3c2ad7050ef63400c078a2..7d642f44e35b88b309375e7ef6b59c257836e644 100644 (file)
@@ -392,7 +392,7 @@ static int icside_dma_init(ide_hwif_t *hwif, const struct ide_port_info *d)
        return 0;
 }
 
-static struct ide_dma_ops icside_v6_dma_ops = {
+static const struct ide_dma_ops icside_v6_dma_ops = {
        .dma_host_set           = icside_dma_host_set,
        .dma_setup              = icside_dma_setup,
        .dma_exec_cmd           = icside_dma_exec_cmd,
index 5853f1109807123229d2d602e9fa9da73f1b65c5..8fa34e26443abbab9023ffaa548fc6ce33897a33 100644 (file)
@@ -328,7 +328,7 @@ static int __devinit palm_bk3710_init_dma(ide_hwif_t *hwif,
        if (ide_allocate_dma_engine(hwif))
                return -1;
 
-       ide_setup_dma(hwif, base, d);
+       ide_setup_dma(hwif, base);
 
        return 0;
 }
index 12d9842dc7ccb2213794264af01d27cd577657a8..a62ca75c7e28f9f216d8e67ae3319c1b9368f59b 100644 (file)
@@ -782,7 +782,7 @@ static const struct ide_port_ops cris_port_ops = {
        .set_dma_mode           = cris_set_dma_mode,
 };
 
-static struct ide_dma_ops cris_dma_ops;
+static const struct ide_dma_ops cris_dma_ops;
 
 static const struct ide_port_info cris_port_info __initdata = {
        .chipset                = ide_etrax100,
@@ -1072,7 +1072,7 @@ static void cris_dma_start(ide_drive_t *drive)
        }
 }
 
-static struct ide_dma_ops cris_dma_ops = {
+static const struct ide_dma_ops cris_dma_ops = {
        .dma_host_set           = cris_dma_host_set,
        .dma_setup              = cris_dma_setup,
        .dma_exec_cmd           = cris_dma_exec_cmd,
index a00d2598ec7f85d6a6b03b102c2c4b4dc478c334..c352cf27b6e7a08f90f70ea81ebe380705a676e0 100644 (file)
@@ -482,11 +482,12 @@ int ide_dma_setup(ide_drive_t *drive)
 
 EXPORT_SYMBOL_GPL(ide_dma_setup);
 
-static void ide_dma_exec_cmd(ide_drive_t *drive, u8 command)
+void ide_dma_exec_cmd(ide_drive_t *drive, u8 command)
 {
        /* issue cmd to drive */
        ide_execute_command(drive, command, &ide_dma_intr, 2*WAIT_CMD, dma_timer_expiry);
 }
+EXPORT_SYMBOL_GPL(ide_dma_exec_cmd);
 
 void ide_dma_start(ide_drive_t *drive)
 {
@@ -532,7 +533,7 @@ int __ide_dma_end (ide_drive_t *drive)
 EXPORT_SYMBOL(__ide_dma_end);
 
 /* returns 1 if dma irq issued, 0 otherwise */
-static int __ide_dma_test_irq(ide_drive_t *drive)
+int ide_dma_test_irq(ide_drive_t *drive)
 {
        ide_hwif_t *hwif        = HWIF(drive);
        u8 dma_stat             = hwif->INB(hwif->dma_status);
@@ -545,6 +546,7 @@ static int __ide_dma_test_irq(ide_drive_t *drive)
                        drive->name, __func__);
        return 0;
 }
+EXPORT_SYMBOL_GPL(ide_dma_test_irq);
 #else
 static inline int config_drive_for_dma(ide_drive_t *drive) { return 0; }
 #endif /* CONFIG_BLK_DEV_IDEDMA_SFF */
@@ -839,21 +841,19 @@ int ide_allocate_dma_engine(ide_hwif_t *hwif)
 }
 EXPORT_SYMBOL_GPL(ide_allocate_dma_engine);
 
-static struct ide_dma_ops sff_dma_ops = {
+static 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,
        .dma_start              = ide_dma_start,
        .dma_end                = __ide_dma_end,
-       .dma_test_irq           = __ide_dma_test_irq,
+       .dma_test_irq           = ide_dma_test_irq,
        .dma_timeout            = ide_dma_timeout,
        .dma_lost_irq           = ide_dma_lost_irq,
 };
 
-void ide_setup_dma(ide_hwif_t *hwif, unsigned long base,
-                  const struct ide_port_info *d)
+void ide_setup_dma(ide_hwif_t *hwif, unsigned long base)
 {
-       struct ide_dma_ops *dma_ops = d->dma_ops ? d->dma_ops : &sff_dma_ops;
        hwif->dma_base = base;
 
        if (!hwif->dma_command)
@@ -867,24 +867,7 @@ void ide_setup_dma(ide_hwif_t *hwif, unsigned long base,
        if (!hwif->dma_prdtable)
                hwif->dma_prdtable      = hwif->dma_base + 4;
 
-       hwif->dma_ops = dma_ops;
-
-       if (dma_ops->dma_host_set == NULL)
-               dma_ops->dma_host_set   = ide_dma_host_set;
-       if (dma_ops->dma_setup == NULL)
-               dma_ops->dma_setup      = ide_dma_setup;
-       if (dma_ops->dma_exec_cmd == NULL)
-               dma_ops->dma_exec_cmd   = ide_dma_exec_cmd;
-       if (dma_ops->dma_start == NULL)
-               dma_ops->dma_start      = ide_dma_start;
-       if (dma_ops->dma_end == NULL)
-               dma_ops->dma_end        = __ide_dma_end;
-       if (dma_ops->dma_test_irq == NULL)
-               dma_ops->dma_test_irq   = __ide_dma_test_irq;
-       if (dma_ops->dma_timeout == NULL)
-               dma_ops->dma_timeout    = ide_dma_timeout;
-       if (dma_ops->dma_lost_irq == NULL)
-               dma_ops->dma_lost_irq   = ide_dma_lost_irq;
+       hwif->dma_ops = &sff_dma_ops;
 }
 
 EXPORT_SYMBOL_GPL(ide_setup_dma);
index 9504aa54c33b19bf67495c7680130acded6d4ae0..a317ca9c46e5f034eedbc90f05de9f85812b7ef4 100644 (file)
@@ -135,7 +135,7 @@ ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task)
        ide_hwif_t *hwif        = HWIF(drive);
        struct ide_taskfile *tf = &task->tf;
        ide_handler_t *handler = NULL;
-       struct ide_dma_ops *dma_ops = hwif->dma_ops;
+       const struct ide_dma_ops *dma_ops = hwif->dma_ops;
 
        if (task->data_phase == TASKFILE_MULTI_IN ||
            task->data_phase == TASKFILE_MULTI_OUT) {
index 579caa3b06f4cfcff4483a9103805fc80b8ea306..3485a310c95b6f07c1a58c3b53047e8abfc0f098 100644 (file)
@@ -380,7 +380,7 @@ static void auide_dma_timeout(ide_drive_t *drive)
        auide_dma_end(drive);
 }
 
-static struct ide_dma_ops au1xxx_dma_ops = {
+static const struct ide_dma_ops au1xxx_dma_ops = {
        .dma_host_set           = auide_dma_host_set,
        .dma_setup              = auide_dma_setup,
        .dma_exec_cmd           = auide_dma_exec_cmd,
index 987db35199e6f92eae8105fb6d3ad12d3d87f05b..b5a3bc33e1678a67aeece04742a2601c0229bbcd 100644 (file)
@@ -731,7 +731,7 @@ static int __devinit init_dma_ali15x3(ide_hwif_t *hwif,
        if (ide_allocate_dma_engine(hwif))
                return -1;
 
-       ide_setup_dma(hwif, base, d);
+       ide_setup_dma(hwif, base);
 
        return 0;
 }
@@ -743,8 +743,15 @@ static const struct ide_port_ops ali_port_ops = {
        .cable_detect           = ali_cable_detect,
 };
 
-static struct ide_dma_ops ali_dma_ops = {
+static const struct ide_dma_ops ali_dma_ops = {
+       .dma_host_set           = ide_dma_host_set,
        .dma_setup              = ali15x3_dma_setup,
+       .dma_exec_cmd           = ide_dma_exec_cmd,
+       .dma_start              = ide_dma_start,
+       .dma_end                = __ide_dma_end,
+       .dma_test_irq           = ide_dma_test_irq,
+       .dma_lost_irq           = ide_dma_lost_irq,
+       .dma_timeout            = ide_dma_timeout,
 };
 
 static const struct ide_port_info ali15x3_chipset __devinitdata = {
index 5fd252e6ed089c3e81ac21263c4a2cb0f37d8b41..006fb62656bca6a5ad60bfe3f395e178b9075a8e 100644 (file)
@@ -391,18 +391,37 @@ static const struct ide_port_ops cmd64x_port_ops = {
        .cable_detect           = cmd64x_cable_detect,
 };
 
-static struct ide_dma_ops cmd64x_dma_ops = {
+static const struct ide_dma_ops cmd64x_dma_ops = {
+       .dma_host_set           = ide_dma_host_set,
+       .dma_setup              = ide_dma_setup,
+       .dma_exec_cmd           = ide_dma_exec_cmd,
+       .dma_start              = ide_dma_start,
        .dma_end                = cmd64x_dma_end,
        .dma_test_irq           = cmd64x_dma_test_irq,
+       .dma_lost_irq           = ide_dma_lost_irq,
+       .dma_timeout            = ide_dma_timeout,
 };
 
-static struct ide_dma_ops cmd646_rev1_dma_ops = {
+static const struct ide_dma_ops cmd646_rev1_dma_ops = {
+       .dma_host_set           = ide_dma_host_set,
+       .dma_setup              = ide_dma_setup,
+       .dma_exec_cmd           = ide_dma_exec_cmd,
+       .dma_start              = ide_dma_start,
        .dma_end                = cmd646_1_dma_end,
+       .dma_test_irq           = ide_dma_test_irq,
+       .dma_lost_irq           = ide_dma_lost_irq,
+       .dma_timeout            = ide_dma_timeout,
 };
 
-static struct ide_dma_ops cmd648_dma_ops = {
+static const struct ide_dma_ops cmd648_dma_ops = {
+       .dma_host_set           = ide_dma_host_set,
+       .dma_setup              = ide_dma_setup,
+       .dma_exec_cmd           = ide_dma_exec_cmd,
+       .dma_start              = ide_dma_start,
        .dma_end                = cmd648_dma_end,
        .dma_test_irq           = cmd648_dma_test_irq,
+       .dma_lost_irq           = ide_dma_lost_irq,
+       .dma_timeout            = ide_dma_timeout,
 };
 
 static const struct ide_port_info cmd64x_chipsets[] __devinitdata = {
index 467d331c8109cb3d92a90c0f57fff7a7ff551683..17669a434438bccbd596e23b4fdc51fdfb2f679e 100644 (file)
@@ -108,8 +108,15 @@ static const struct ide_port_ops cs5520_port_ops = {
        .set_dma_mode           = cs5520_set_dma_mode,
 };
 
-static struct ide_dma_ops cs5520_dma_ops = {
+static const struct ide_dma_ops cs5520_dma_ops = {
        .dma_host_set           = cs5520_dma_host_set,
+       .dma_setup              = ide_dma_setup,
+       .dma_exec_cmd           = ide_dma_exec_cmd,
+       .dma_start              = ide_dma_start,
+       .dma_end                = __ide_dma_end,
+       .dma_test_irq           = ide_dma_test_irq,
+       .dma_lost_irq           = ide_dma_lost_irq,
+       .dma_timeout            = ide_dma_timeout,
 };
 
 #define DECLARE_CS_DEV(name_str)                               \
index 5030bda1adeb7670c0cd09a8114d9fbb18278bf8..8c02961d01886c0912991efc7c7005c53be1e8a4 100644 (file)
@@ -1347,7 +1347,7 @@ static int __devinit init_dma_hpt366(ide_hwif_t *hwif,
        if (ide_allocate_dma_engine(hwif))
                return -1;
 
-       ide_setup_dma(hwif, base, d);
+       ide_setup_dma(hwif, base);
 
        return 0;
 }
@@ -1415,19 +1415,37 @@ static const struct ide_port_ops hpt3xx_port_ops = {
        .cable_detect           = hpt3xx_cable_detect,
 };
 
-static struct ide_dma_ops hpt37x_dma_ops = {
+static const struct ide_dma_ops hpt37x_dma_ops = {
+       .dma_host_set           = ide_dma_host_set,
+       .dma_setup              = ide_dma_setup,
+       .dma_exec_cmd           = ide_dma_exec_cmd,
+       .dma_start              = ide_dma_start,
        .dma_end                = hpt374_dma_end,
        .dma_test_irq           = hpt374_dma_test_irq,
+       .dma_lost_irq           = ide_dma_lost_irq,
+       .dma_timeout            = ide_dma_timeout,
 };
 
-static struct ide_dma_ops hpt370_dma_ops = {
+static const struct ide_dma_ops hpt370_dma_ops = {
+       .dma_host_set           = ide_dma_host_set,
+       .dma_setup              = ide_dma_setup,
+       .dma_exec_cmd           = ide_dma_exec_cmd,
        .dma_start              = hpt370_dma_start,
        .dma_end                = hpt370_dma_end,
+       .dma_test_irq           = ide_dma_test_irq,
+       .dma_lost_irq           = ide_dma_lost_irq,
        .dma_timeout            = hpt370_dma_timeout,
 };
 
-static struct ide_dma_ops hpt36x_dma_ops = {
+static const struct ide_dma_ops hpt36x_dma_ops = {
+       .dma_host_set           = ide_dma_host_set,
+       .dma_setup              = ide_dma_setup,
+       .dma_exec_cmd           = ide_dma_exec_cmd,
+       .dma_start              = ide_dma_start,
+       .dma_end                = __ide_dma_end,
+       .dma_test_irq           = ide_dma_test_irq,
        .dma_lost_irq           = hpt366_dma_lost_irq,
+       .dma_timeout            = ide_dma_timeout,
 };
 
 static const struct ide_port_info hpt366_chipsets[] __devinitdata = {
index 5a6dec0e1f4d70aec615898abc361db9105dc353..e1b0c9a9ab9c19485ce84b5451efb7e68496501b 100644 (file)
@@ -258,9 +258,15 @@ static const struct ide_port_ops ns87415_port_ops = {
        .selectproc             = ns87415_selectproc,
 };
 
-static struct ide_dma_ops ns87415_dma_ops = {
+static const struct ide_dma_ops ns87415_dma_ops = {
+       .dma_host_set           = ide_dma_host_set,
        .dma_setup              = ns87415_dma_setup,
+       .dma_exec_cmd           = ide_dma_exec_cmd,
+       .dma_start              = ide_dma_start,
        .dma_end                = ns87415_dma_end,
+       .dma_test_irq           = ide_dma_test_irq,
+       .dma_lost_irq           = ide_dma_lost_irq,
+       .dma_timeout            = ide_dma_timeout,
 };
 
 static const struct ide_port_info ns87415_chipset __devinitdata = {
index 9c490fd63fde22cd7306c547c10bc43138d2820f..fca89eda5c022cf8538eeaa0e89dd9344223d6ec 100644 (file)
@@ -329,13 +329,21 @@ static const struct ide_port_ops pdc2026x_port_ops = {
        .cable_detect           = pdc2026x_cable_detect,
 };
 
-static struct ide_dma_ops pdc20246_dma_ops = {
+static const struct ide_dma_ops pdc20246_dma_ops = {
+       .dma_host_set           = ide_dma_host_set,
+       .dma_setup              = ide_dma_setup,
+       .dma_exec_cmd           = ide_dma_exec_cmd,
+       .dma_start              = ide_dma_start,
+       .dma_end                = __ide_dma_end,
        .dma_test_irq           = pdc202xx_dma_test_irq,
        .dma_lost_irq           = pdc202xx_dma_lost_irq,
        .dma_timeout            = pdc202xx_dma_timeout,
 };
 
-static struct ide_dma_ops pdc2026x_dma_ops = {
+static const struct ide_dma_ops pdc2026x_dma_ops = {
+       .dma_host_set           = ide_dma_host_set,
+       .dma_setup              = ide_dma_setup,
+       .dma_exec_cmd           = ide_dma_exec_cmd,
        .dma_start              = pdc202xx_dma_start,
        .dma_end                = pdc202xx_dma_end,
        .dma_test_irq           = pdc202xx_dma_test_irq,
index 303bcfb2a4414b6355dde03ac455e14a41b2568a..14c787b5d95f89c8fd6406d22cd82ef72d4322bb 100644 (file)
@@ -292,8 +292,15 @@ static const struct ide_port_ops sc1200_port_ops = {
        .udma_filter            = sc1200_udma_filter,
 };
 
-static struct ide_dma_ops sc1200_dma_ops = {
+static const struct ide_dma_ops sc1200_dma_ops = {
+       .dma_host_set           = ide_dma_host_set,
+       .dma_setup              = ide_dma_setup,
+       .dma_exec_cmd           = ide_dma_exec_cmd,
+       .dma_start              = ide_dma_start,
        .dma_end                = sc1200_dma_end,
+       .dma_test_irq           = ide_dma_test_irq,
+       .dma_lost_irq           = ide_dma_lost_irq,
+       .dma_timeout            = ide_dma_timeout,
 };
 
 static const struct ide_port_info sc1200_chipset __devinitdata = {
index 5117c11134cdec9973ccbfa3273567fdaf0f4769..17cf86490d59df0b9da4ea1b56a2be4805a4dba8 100644 (file)
@@ -705,10 +705,15 @@ static const struct ide_port_ops scc_port_ops = {
        .cable_detect           = scc_cable_detect,
 };
 
-static struct ide_dma_ops scc_dma_ops = {
+static const struct ide_dma_ops scc_dma_ops = {
+       .dma_host_set           = ide_dma_host_set,
        .dma_setup              = scc_dma_setup,
+       .dma_exec_cmd           = ide_dma_exec_cmd,
+       .dma_start              = ide_dma_start,
        .dma_end                = scc_dma_end,
        .dma_test_irq           = scc_dma_test_irq,
+       .dma_lost_irq           = ide_dma_lost_irq,
+       .dma_timeout            = ide_dma_timeout,
 };
 
 #define DECLARE_SCC_DEV(name_str)                      \
index 2cbb7fd1ddec674a29deaa0e5aa4118c9442a5e4..321a4e28ac19fa0698f20d21d573296b6b3dc73f 100644 (file)
@@ -558,7 +558,7 @@ static const struct ide_port_ops sgiioc4_port_ops = {
        .maskproc               = sgiioc4_maskproc,
 };
 
-static struct ide_dma_ops sgiioc4_dma_ops = {
+static const struct ide_dma_ops sgiioc4_dma_ops = {
        .dma_host_set           = sgiioc4_dma_host_set,
        .dma_setup              = sgiioc4_dma_setup,
        .dma_start              = sgiioc4_dma_start,
index 635d607bc0cf726d87c67e733c29c56e46991ed1..ce84fa045d39186a05b08f41a643a00428ff4407 100644 (file)
@@ -288,9 +288,13 @@ static const struct ide_port_ops sl82c105_port_ops = {
        .resetproc              = sl82c105_resetproc,
 };
 
-static struct ide_dma_ops sl82c105_dma_ops = {
+static const struct ide_dma_ops sl82c105_dma_ops = {
+       .dma_host_set           = ide_dma_host_set,
+       .dma_setup              = ide_dma_setup,
+       .dma_exec_cmd           = ide_dma_exec_cmd,
        .dma_start              = sl82c105_dma_start,
        .dma_end                = sl82c105_dma_end,
+       .dma_test_irq           = ide_dma_test_irq,
        .dma_lost_irq           = sl82c105_dma_lost_irq,
        .dma_timeout            = sl82c105_dma_timeout,
 };
index 4ce240db32630e56213c36f90670c89ef2439e39..9b4b27a4c71121c30298052a30c653f5ccffee05 100644 (file)
@@ -186,8 +186,15 @@ static const struct ide_port_ops tc86c001_port_ops = {
        .cable_detect           = tc86c001_cable_detect,
 };
 
-static struct ide_dma_ops tc86c001_dma_ops = {
+static const struct ide_dma_ops tc86c001_dma_ops = {
+       .dma_host_set           = ide_dma_host_set,
+       .dma_setup              = ide_dma_setup,
+       .dma_exec_cmd           = ide_dma_exec_cmd,
        .dma_start              = tc86c001_dma_start,
+       .dma_end                = __ide_dma_end,
+       .dma_test_irq           = ide_dma_test_irq,
+       .dma_lost_irq           = ide_dma_lost_irq,
+       .dma_timeout            = ide_dma_timeout,
 };
 
 static const struct ide_port_info tc86c001_chipset __devinitdata = {
index c506e97cd716679b0011b98a70cf73b92c8912df..15ee38f7ad3f5525d044e496d93e460c8201082c 100644 (file)
@@ -320,6 +320,8 @@ static struct ide_dma_ops trm290_dma_ops = {
        .dma_start              = trm290_dma_start,
        .dma_end                = trm290_dma_end,
        .dma_test_irq           = trm290_dma_test_irq,
+       .dma_lost_irq           = ide_dma_lost_irq,
+       .dma_timeout            = ide_dma_timeout,
 };
 
 static const struct ide_port_info trm290_chipset __devinitdata = {
index 0ee16acfdf29fe6d0c81654399cd28e187f82a10..185faa0dce94b52745abd8d68fd51c86b6463521 100644 (file)
@@ -930,7 +930,7 @@ static const struct ide_port_ops pmac_ide_port_ops = {
        .selectproc             = pmac_ide_selectproc,
 };
 
-static struct ide_dma_ops pmac_dma_ops;
+static const struct ide_dma_ops pmac_dma_ops;
 
 static const struct ide_port_info pmac_port_info = {
        .init_dma               = pmac_ide_init_dma,
@@ -1675,7 +1675,7 @@ pmac_ide_dma_lost_irq (ide_drive_t *drive)
        printk(KERN_ERR "ide-pmac lost interrupt, dma status: %lx\n", status);
 }
 
-static struct ide_dma_ops pmac_dma_ops = {
+static const struct ide_dma_ops pmac_dma_ops = {
        .dma_host_set           = pmac_ide_dma_host_set,
        .dma_setup              = pmac_ide_dma_setup,
        .dma_exec_cmd           = pmac_ide_dma_exec_cmd,
index 9a1e01e176f0d62ea1392f6bdc92e8d6311786df..5171601fb2556646544587466a14b8e973389a15 100644 (file)
@@ -385,7 +385,7 @@ 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, d);
+               ide_setup_dma(hwif, base);
        }
 
        return 0;
index 079b6f9405ed3efac9a159dd85ed49782a95a1f7..f0af504dfa429c65ec5586aee6ebaf3a1c39e2bb 100644 (file)
@@ -462,7 +462,7 @@ typedef struct hwif_s {
        void (*rw_disk)(ide_drive_t *, struct request *);
 
        const struct ide_port_ops       *port_ops;
-       struct ide_dma_ops              *dma_ops;
+       const struct ide_dma_ops        *dma_ops;
 
        void (*ata_input_data)(ide_drive_t *, void *, u32);
        void (*ata_output_data)(ide_drive_t *, void *, u32);
@@ -1118,7 +1118,7 @@ struct ide_port_info {
                                            const struct ide_port_info *);
 
        const struct ide_port_ops       *port_ops;
-       struct ide_dma_ops              *dma_ops;
+       const struct ide_dma_ops        *dma_ops;
 
        ide_pci_enablebit_t     enablebits[2];
        hwif_chipset_t          chipset;
@@ -1170,12 +1170,14 @@ 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, const struct ide_port_info *);
+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 *);
+void ide_dma_exec_cmd(ide_drive_t *, u8);
 extern void ide_dma_start(ide_drive_t *);
 extern int __ide_dma_end(ide_drive_t *);
+int ide_dma_test_irq(ide_drive_t *);
 extern void ide_dma_lost_irq(ide_drive_t *);
 extern void ide_dma_timeout(ide_drive_t *);
 #endif /* CONFIG_BLK_DEV_IDEDMA_SFF */