summaryrefslogtreecommitdiff
path: root/drivers/ide/ide-dma.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 20:13:01 +0100
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 20:13:01 +0100
commit4a546e046d562bcd389149591fa5a534c8f832ca (patch)
treeffc5c7bd088a0bf74744721b9cfcf18220a75fdf /drivers/ide/ide-dma.c
parent378f577f7f75aa18a0eeafb044a491dcd5aeaa3d (diff)
downloadlwn-4a546e046d562bcd389149591fa5a534c8f832ca.tar.gz
lwn-4a546e046d562bcd389149591fa5a534c8f832ca.zip
ide: remove ->ide_dma_on and ->dma_off_quietly methods from ide_hwif_t
* Make ide_dma_off_quietly() and __ide_dma_on() always available. * Drop "__" prefix from __ide_dma_on(). * Check for presence of ->dma_host_on instead of ->ide_dma_on. * Convert all users of ->ide_dma_on and ->dma_off_quietly methods to use ide_dma_on() and ide_dma_off_quietly() instead. * Remove no longer needed ->ide_dma_on and ->dma_off_quietly methods from ide_hwif_t. * Make ide_dma_on() void. There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-dma.c')
-rw-r--r--drivers/ide/ide-dma.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index 9d6dabbbf809..edd0018c4988 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -425,6 +425,7 @@ void ide_dma_host_off(ide_drive_t *drive)
}
EXPORT_SYMBOL(ide_dma_host_off);
+#endif /* CONFIG_BLK_DEV_IDEDMA_PCI */
/**
* ide_dma_off_quietly - Generic DMA kill
@@ -442,7 +443,6 @@ void ide_dma_off_quietly(ide_drive_t *drive)
}
EXPORT_SYMBOL(ide_dma_off_quietly);
-#endif /* CONFIG_BLK_DEV_IDEDMA_PCI */
/**
* ide_dma_off - disable DMA on a device
@@ -455,7 +455,7 @@ EXPORT_SYMBOL(ide_dma_off_quietly);
void ide_dma_off(ide_drive_t *drive)
{
printk(KERN_INFO "%s: DMA disabled\n", drive->name);
- drive->hwif->dma_off_quietly(drive);
+ ide_dma_off_quietly(drive);
}
EXPORT_SYMBOL(ide_dma_off);
@@ -481,26 +481,26 @@ void ide_dma_host_on(ide_drive_t *drive)
}
EXPORT_SYMBOL(ide_dma_host_on);
+#endif
/**
- * __ide_dma_on - Enable DMA on a device
+ * ide_dma_on - Enable DMA on a device
* @drive: drive to enable DMA on
*
* Enable IDE DMA for a device on this IDE controller.
*/
-
-int __ide_dma_on (ide_drive_t *drive)
+
+void ide_dma_on(ide_drive_t *drive)
{
drive->using_dma = 1;
ide_toggle_bounce(drive, 1);
drive->hwif->dma_host_on(drive);
-
- return 0;
}
-EXPORT_SYMBOL(__ide_dma_on);
+EXPORT_SYMBOL(ide_dma_on);
+#ifdef CONFIG_BLK_DEV_IDEDMA_PCI
/**
* ide_dma_setup - begin a DMA phase
* @drive: target device
@@ -827,7 +827,6 @@ err_out:
int ide_set_dma(ide_drive_t *drive)
{
- ide_hwif_t *hwif = drive->hwif;
int rc;
/*
@@ -836,13 +835,15 @@ int ide_set_dma(ide_drive_t *drive)
* things, if not checked and cleared.
* PARANOIA!!!
*/
- hwif->dma_off_quietly(drive);
+ ide_dma_off_quietly(drive);
rc = ide_dma_check(drive);
if (rc)
return rc;
- return hwif->ide_dma_on(drive);
+ ide_dma_on(drive);
+
+ return 0;
}
#ifdef CONFIG_BLK_DEV_IDEDMA_PCI
@@ -979,12 +980,8 @@ void ide_setup_dma(ide_hwif_t *hwif, unsigned long base, unsigned num_ports)
if (!(hwif->dma_prdtable))
hwif->dma_prdtable = (hwif->dma_base + 4);
- if (!hwif->dma_off_quietly)
- hwif->dma_off_quietly = &ide_dma_off_quietly;
if (!hwif->dma_host_off)
hwif->dma_host_off = &ide_dma_host_off;
- if (!hwif->ide_dma_on)
- hwif->ide_dma_on = &__ide_dma_on;
if (!hwif->dma_host_on)
hwif->dma_host_on = &ide_dma_host_on;
if (!hwif->dma_setup)