aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-dma.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-02-16 20:40:26 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-02-16 20:40:26 -0500
commit7469aaf6a30f4187ed6de7c0aed5c2dd2d1c2d31 (patch)
tree079930f23b3d14e4ad29ab972bc6d91fde52e5f0 /drivers/ide/ide-dma.c
parent3608b5d71a52c053787dbad6af20c25f7e0b75a9 (diff)
ide: make ide_hwif_t.ide_dma_{host_off,off_quietly} void (v2)
* since ide_hwif_t.ide_dma_{host_off,off_quietly} always return '0' make these functions void and while at it drop "ide_" prefix * fix comment for __ide_dma_off_quietly() * make __ide_dma_{host_off,off_quietly,off}() void and drop "__" prefix v2: * while at it rename atiixp_ide_dma_host_off() to atiixp_dma_host_off(), sgiioc4_ide_dma_{host_off,off_quietly}() to sgiioc4_dma_{host_off,off_quietly}() and sl82c105_ide_dma_off_quietly() to sl82c105_dma_off_quietly() [ Noticed 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.c39
1 files changed, 18 insertions, 21 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index 4fbcea4c1025..a15217b136f5 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -414,61 +414,57 @@ static int dma_timer_expiry (ide_drive_t *drive)
414} 414}
415 415
416/** 416/**
417 * __ide_dma_host_off - Generic DMA kill 417 * ide_dma_host_off - Generic DMA kill
418 * @drive: drive to control 418 * @drive: drive to control
419 * 419 *
420 * Perform the generic IDE controller DMA off operation. This 420 * Perform the generic IDE controller DMA off operation. This
421 * works for most IDE bus mastering controllers 421 * works for most IDE bus mastering controllers
422 */ 422 */
423 423
424int __ide_dma_host_off (ide_drive_t *drive) 424void ide_dma_host_off(ide_drive_t *drive)
425{ 425{
426 ide_hwif_t *hwif = HWIF(drive); 426 ide_hwif_t *hwif = HWIF(drive);
427 u8 unit = (drive->select.b.unit & 0x01); 427 u8 unit = (drive->select.b.unit & 0x01);
428 u8 dma_stat = hwif->INB(hwif->dma_status); 428 u8 dma_stat = hwif->INB(hwif->dma_status);
429 429
430 hwif->OUTB((dma_stat & ~(1<<(5+unit))), hwif->dma_status); 430 hwif->OUTB((dma_stat & ~(1<<(5+unit))), hwif->dma_status);
431 return 0;
432} 431}
433 432
434EXPORT_SYMBOL(__ide_dma_host_off); 433EXPORT_SYMBOL(ide_dma_host_off);
435 434
436/** 435/**
437 * __ide_dma_host_off_quietly - Generic DMA kill 436 * ide_dma_off_quietly - Generic DMA kill
438 * @drive: drive to control 437 * @drive: drive to control
439 * 438 *
440 * Turn off the current DMA on this IDE controller. 439 * Turn off the current DMA on this IDE controller.
441 */ 440 */
442 441
443int __ide_dma_off_quietly (ide_drive_t *drive) 442void ide_dma_off_quietly(ide_drive_t *drive)
444{ 443{
445 drive->using_dma = 0; 444 drive->using_dma = 0;
446 ide_toggle_bounce(drive, 0); 445 ide_toggle_bounce(drive, 0);
447 446
448 if (HWIF(drive)->ide_dma_host_off(drive)) 447 drive->hwif->dma_host_off(drive);
449 return 1;
450
451 return 0;
452} 448}
453 449
454EXPORT_SYMBOL(__ide_dma_off_quietly); 450EXPORT_SYMBOL(ide_dma_off_quietly);
455#endif /* CONFIG_BLK_DEV_IDEDMA_PCI */ 451#endif /* CONFIG_BLK_DEV_IDEDMA_PCI */
456 452
457/** 453/**
458 * __ide_dma_off - disable DMA on a device 454 * ide_dma_off - disable DMA on a device
459 * @drive: drive to disable DMA on 455 * @drive: drive to disable DMA on
460 * 456 *
461 * Disable IDE DMA for a device on this IDE controller. 457 * Disable IDE DMA for a device on this IDE controller.
462 * Inform the user that DMA has been disabled. 458 * Inform the user that DMA has been disabled.
463 */ 459 */
464 460
465int __ide_dma_off (ide_drive_t *drive) 461void ide_dma_off(ide_drive_t *drive)
466{ 462{
467 printk(KERN_INFO "%s: DMA disabled\n", drive->name); 463 printk(KERN_INFO "%s: DMA disabled\n", drive->name);
468 return HWIF(drive)->ide_dma_off_quietly(drive); 464 drive->hwif->dma_off_quietly(drive);
469} 465}
470 466
471EXPORT_SYMBOL(__ide_dma_off); 467EXPORT_SYMBOL(ide_dma_off);
472 468
473#ifdef CONFIG_BLK_DEV_IDEDMA_PCI 469#ifdef CONFIG_BLK_DEV_IDEDMA_PCI
474/** 470/**
@@ -758,7 +754,7 @@ void ide_dma_verbose(ide_drive_t *drive)
758 return; 754 return;
759bug_dma_off: 755bug_dma_off:
760 printk(", BUG DMA OFF"); 756 printk(", BUG DMA OFF");
761 hwif->ide_dma_off_quietly(drive); 757 hwif->dma_off_quietly(drive);
762 return; 758 return;
763} 759}
764 760
@@ -773,7 +769,8 @@ int ide_set_dma(ide_drive_t *drive)
773 769
774 switch(rc) { 770 switch(rc) {
775 case -1: /* DMA needs to be disabled */ 771 case -1: /* DMA needs to be disabled */
776 return hwif->ide_dma_off_quietly(drive); 772 hwif->dma_off_quietly(drive);
773 return 0;
777 case 0: /* DMA needs to be enabled */ 774 case 0: /* DMA needs to be enabled */
778 return hwif->ide_dma_on(drive); 775 return hwif->ide_dma_on(drive);
779 case 1: /* DMA setting cannot be changed */ 776 case 1: /* DMA setting cannot be changed */
@@ -937,10 +934,10 @@ void ide_setup_dma (ide_hwif_t *hwif, unsigned long dma_base, unsigned int num_p
937 if (!(hwif->dma_prdtable)) 934 if (!(hwif->dma_prdtable))
938 hwif->dma_prdtable = (hwif->dma_base + 4); 935 hwif->dma_prdtable = (hwif->dma_base + 4);
939 936
940 if (!hwif->ide_dma_off_quietly) 937 if (!hwif->dma_off_quietly)
941 hwif->ide_dma_off_quietly = &__ide_dma_off_quietly; 938 hwif->dma_off_quietly = &ide_dma_off_quietly;
942 if (!hwif->ide_dma_host_off) 939 if (!hwif->dma_host_off)
943 hwif->ide_dma_host_off = &__ide_dma_host_off; 940 hwif->dma_host_off = &ide_dma_host_off;
944 if (!hwif->ide_dma_on) 941 if (!hwif->ide_dma_on)
945 hwif->ide_dma_on = &__ide_dma_on; 942 hwif->ide_dma_on = &__ide_dma_on;
946 if (!hwif->ide_dma_host_on) 943 if (!hwif->ide_dma_host_on)