From c283f5dbe31920ca70b80a594a97bfaa2a28be13 Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Mon, 9 Jul 2007 23:17:54 +0200 Subject: ide: make void and rename ide_dma_timeout() method Since ide_dma_timeout() method's result is discarded, make it return 'void'. While at it, drop 'ide_' from the method's name, drop the '__' prefix from the default method's name, and do some cleanups in this method driver-wise: - in ide-dma.c, au1xxx-ide.c, and pdc202xx_old.c, define/use 'hwif' variable; - in au1xxx-ide.c, get rid of commented out printk(); - in sl82c105.c, get rid of unnecessary variables. Signed-off-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ide/ide-dma.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'drivers/ide/ide-dma.c') diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index ce322602982..ca55bfa4ac7 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c @@ -857,16 +857,19 @@ void ide_dma_lost_irq (ide_drive_t *drive) EXPORT_SYMBOL(ide_dma_lost_irq); -int __ide_dma_timeout (ide_drive_t *drive) +void ide_dma_timeout (ide_drive_t *drive) { + ide_hwif_t *hwif = HWIF(drive); + printk(KERN_ERR "%s: timeout waiting for DMA\n", drive->name); - if (HWIF(drive)->ide_dma_test_irq(drive)) - return 0; - return HWIF(drive)->ide_dma_end(drive); + if (hwif->ide_dma_test_irq(drive)) + return; + + hwif->ide_dma_end(drive); } -EXPORT_SYMBOL(__ide_dma_timeout); +EXPORT_SYMBOL(ide_dma_timeout); /* * Needed for allowing full modular support of ide-driver @@ -1017,8 +1020,8 @@ void ide_setup_dma (ide_hwif_t *hwif, unsigned long dma_base, unsigned int num_p hwif->ide_dma_end = &__ide_dma_end; if (!hwif->ide_dma_test_irq) hwif->ide_dma_test_irq = &__ide_dma_test_irq; - if (!hwif->ide_dma_timeout) - hwif->ide_dma_timeout = &__ide_dma_timeout; + if (!hwif->dma_timeout) + hwif->dma_timeout = &ide_dma_timeout; if (!hwif->dma_lost_irq) hwif->dma_lost_irq = &ide_dma_lost_irq; -- cgit v1.2.3