diff options
author | Sergei Shtylylov <sshtylyov@ru.mvista.com> | 2006-10-03 04:14:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-03 11:04:07 -0400 |
commit | dc844e05913b84d09e86d88c0f861ef0afbee2fd (patch) | |
tree | 59386fc160b2074fb282e1c56998c6a8f32291f4 | |
parent | 020e322de3ff75d32daa58e431aad07071da27c6 (diff) |
[PATCH] IDE: always release DMA engine
Release the DMA engine for the custom mapping IDE drivers also (for
example, siimage.c does allocate it in both I/O-mapped and custom-mapped
modes). Remove useless code from the error path of
ide_allocate_dma_engine().
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/ide/ide-dma.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index 9937fa7da546..22ef73eb1f68 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c | |||
@@ -809,15 +809,14 @@ static int ide_release_iomio_dma(ide_hwif_t *hwif) | |||
809 | /* | 809 | /* |
810 | * Needed for allowing full modular support of ide-driver | 810 | * Needed for allowing full modular support of ide-driver |
811 | */ | 811 | */ |
812 | int ide_release_dma (ide_hwif_t *hwif) | 812 | int ide_release_dma(ide_hwif_t *hwif) |
813 | { | 813 | { |
814 | ide_release_dma_engine(hwif); | ||
815 | |||
814 | if (hwif->mmio == 2) | 816 | if (hwif->mmio == 2) |
815 | return 1; | 817 | return 1; |
816 | if (hwif->chipset == ide_etrax100) | 818 | else |
817 | return 1; | 819 | return ide_release_iomio_dma(hwif); |
818 | |||
819 | ide_release_dma_engine(hwif); | ||
820 | return ide_release_iomio_dma(hwif); | ||
821 | } | 820 | } |
822 | 821 | ||
823 | static int ide_allocate_dma_engine(ide_hwif_t *hwif) | 822 | static int ide_allocate_dma_engine(ide_hwif_t *hwif) |
@@ -829,10 +828,9 @@ static int ide_allocate_dma_engine(ide_hwif_t *hwif) | |||
829 | if (hwif->dmatable_cpu) | 828 | if (hwif->dmatable_cpu) |
830 | return 0; | 829 | return 0; |
831 | 830 | ||
832 | printk(KERN_ERR "%s: -- Error, unable to allocate%s DMA table(s).\n", | 831 | printk(KERN_ERR "%s: -- Error, unable to allocate DMA table.\n", |
833 | hwif->cds->name, !hwif->dmatable_cpu ? " CPU" : ""); | 832 | hwif->cds->name); |
834 | 833 | ||
835 | ide_release_dma_engine(hwif); | ||
836 | return 1; | 834 | return 1; |
837 | } | 835 | } |
838 | 836 | ||