diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2009-01-06 11:21:02 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-01-06 11:21:02 -0500 |
commit | 592b5315219881c6c0af4785f96456ad2043193a (patch) | |
tree | 2b330d7b4880c10013a9e3e86b5cf18160aed785 /drivers/ide/setup-pci.c | |
parent | 3f023b0138b7db21bac0074b3d5ca2854372c6ff (diff) |
ide: move read_sff_dma_status() method to 'struct ide_dma_ops'
Move apparently misplaced read_sff_dma_status() method from 'struct ide_tp_ops'
to 'struct ide_dma_ops', renaming it to dma_sff_read_status() and making only
required for SFF-8038i compatible IDE controller drivers (greatly cutting down
the number of initializers) as its only user (outside ide-dma-sff.c and such
drivers) appears to be ide_pci_check_simplex() which is only called for such
controllers...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/setup-pci.c')
-rw-r--r-- | drivers/ide/setup-pci.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c index bc37dff8c675..e85d1ed29c2a 100644 --- a/drivers/ide/setup-pci.c +++ b/drivers/ide/setup-pci.c | |||
@@ -130,7 +130,7 @@ int ide_pci_check_simplex(ide_hwif_t *hwif, const struct ide_port_info *d) | |||
130 | * we tune the drive then try to grab DMA ownership if we want to be | 130 | * we tune the drive then try to grab DMA ownership if we want to be |
131 | * the DMA end. This has to be become dynamic to handle hot-plug. | 131 | * the DMA end. This has to be become dynamic to handle hot-plug. |
132 | */ | 132 | */ |
133 | dma_stat = hwif->tp_ops->read_sff_dma_status(hwif); | 133 | dma_stat = hwif->dma_ops->dma_sff_read_status(hwif); |
134 | if ((dma_stat & 0x80) && hwif->mate && hwif->mate->dma_base) { | 134 | if ((dma_stat & 0x80) && hwif->mate && hwif->mate->dma_base) { |
135 | printk(KERN_INFO "%s %s: simplex device: DMA disabled\n", | 135 | printk(KERN_INFO "%s %s: simplex device: DMA disabled\n", |
136 | d->name, pci_name(dev)); | 136 | d->name, pci_name(dev)); |
@@ -377,6 +377,9 @@ int ide_hwif_setup_dma(ide_hwif_t *hwif, const struct ide_port_info *d) | |||
377 | 377 | ||
378 | hwif->dma_base = base; | 378 | hwif->dma_base = base; |
379 | 379 | ||
380 | if (hwif->dma_ops == NULL) | ||
381 | hwif->dma_ops = &sff_dma_ops; | ||
382 | |||
380 | if (ide_pci_check_simplex(hwif, d) < 0) | 383 | if (ide_pci_check_simplex(hwif, d) < 0) |
381 | return -1; | 384 | return -1; |
382 | 385 | ||
@@ -393,8 +396,6 @@ int ide_hwif_setup_dma(ide_hwif_t *hwif, const struct ide_port_info *d) | |||
393 | 396 | ||
394 | if (ide_allocate_dma_engine(hwif)) | 397 | if (ide_allocate_dma_engine(hwif)) |
395 | return -1; | 398 | return -1; |
396 | |||
397 | hwif->dma_ops = &sff_dma_ops; | ||
398 | } | 399 | } |
399 | 400 | ||
400 | return 0; | 401 | return 0; |