aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-dma.c')
-rw-r--r--drivers/ide/ide-dma.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index a15217b136f5..08e7cd043bcc 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -468,14 +468,14 @@ EXPORT_SYMBOL(ide_dma_off);
468 468
469#ifdef CONFIG_BLK_DEV_IDEDMA_PCI 469#ifdef CONFIG_BLK_DEV_IDEDMA_PCI
470/** 470/**
471 * __ide_dma_host_on - Enable DMA on a host 471 * ide_dma_host_on - Enable DMA on a host
472 * @drive: drive to enable for DMA 472 * @drive: drive to enable for DMA
473 * 473 *
474 * Enable DMA on an IDE controller following generic bus mastering 474 * Enable DMA on an IDE controller following generic bus mastering
475 * IDE controller behaviour 475 * IDE controller behaviour
476 */ 476 */
477 477
478int __ide_dma_host_on (ide_drive_t *drive) 478void ide_dma_host_on(ide_drive_t *drive)
479{ 479{
480 if (drive->using_dma) { 480 if (drive->using_dma) {
481 ide_hwif_t *hwif = HWIF(drive); 481 ide_hwif_t *hwif = HWIF(drive);
@@ -483,12 +483,10 @@ int __ide_dma_host_on (ide_drive_t *drive)
483 u8 dma_stat = hwif->INB(hwif->dma_status); 483 u8 dma_stat = hwif->INB(hwif->dma_status);
484 484
485 hwif->OUTB((dma_stat|(1<<(5+unit))), hwif->dma_status); 485 hwif->OUTB((dma_stat|(1<<(5+unit))), hwif->dma_status);
486 return 0;
487 } 486 }
488 return 1;
489} 487}
490 488
491EXPORT_SYMBOL(__ide_dma_host_on); 489EXPORT_SYMBOL(ide_dma_host_on);
492 490
493/** 491/**
494 * __ide_dma_on - Enable DMA on a device 492 * __ide_dma_on - Enable DMA on a device
@@ -506,8 +504,7 @@ int __ide_dma_on (ide_drive_t *drive)
506 drive->using_dma = 1; 504 drive->using_dma = 1;
507 ide_toggle_bounce(drive, 1); 505 ide_toggle_bounce(drive, 1);
508 506
509 if (HWIF(drive)->ide_dma_host_on(drive)) 507 drive->hwif->dma_host_on(drive);
510 return 1;
511 508
512 return 0; 509 return 0;
513} 510}
@@ -940,8 +937,8 @@ void ide_setup_dma (ide_hwif_t *hwif, unsigned long dma_base, unsigned int num_p
940 hwif->dma_host_off = &ide_dma_host_off; 937 hwif->dma_host_off = &ide_dma_host_off;
941 if (!hwif->ide_dma_on) 938 if (!hwif->ide_dma_on)
942 hwif->ide_dma_on = &__ide_dma_on; 939 hwif->ide_dma_on = &__ide_dma_on;
943 if (!hwif->ide_dma_host_on) 940 if (!hwif->dma_host_on)
944 hwif->ide_dma_host_on = &__ide_dma_host_on; 941 hwif->dma_host_on = &ide_dma_host_on;
945 if (!hwif->ide_dma_check) 942 if (!hwif->ide_dma_check)
946 hwif->ide_dma_check = &__ide_dma_check; 943 hwif->ide_dma_check = &__ide_dma_check;
947 if (!hwif->dma_setup) 944 if (!hwif->dma_setup)