diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-31 14:15:22 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-31 14:15:22 -0400 |
commit | 88b4132e101e60e8fa67996ae3072ab6b71e8500 (patch) | |
tree | 6b65c2d0d8691c577d60e6d1f84ad6db172a82d7 /drivers/ide/trm290.c | |
parent | 11998b316173f814698f9037ce9179d634d1f423 (diff) |
ide: set/clear drive->waiting_for_dma flag in the core code
Set/clear drive->waiting_for_dma flag in the core code
instead of in ->dma_setup and ->dma_end methods.
There should be no functional 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/trm290.c')
-rw-r--r-- | drivers/ide/trm290.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/ide/trm290.c b/drivers/ide/trm290.c index 0be27cae27d5..c0528f27fcae 100644 --- a/drivers/ide/trm290.c +++ b/drivers/ide/trm290.c | |||
@@ -198,9 +198,9 @@ static int trm290_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd) | |||
198 | return 1; | 198 | return 1; |
199 | 199 | ||
200 | outl(hwif->dmatable_dma | rw, hwif->dma_base); | 200 | outl(hwif->dmatable_dma | rw, hwif->dma_base); |
201 | drive->waiting_for_dma = 1; | ||
202 | /* start DMA */ | 201 | /* start DMA */ |
203 | outw(count * 2 - 1, hwif->dma_base + 2); | 202 | outw(count * 2 - 1, hwif->dma_base + 2); |
203 | |||
204 | return 0; | 204 | return 0; |
205 | } | 205 | } |
206 | 206 | ||
@@ -211,11 +211,7 @@ static void trm290_dma_start(ide_drive_t *drive) | |||
211 | 211 | ||
212 | static int trm290_dma_end(ide_drive_t *drive) | 212 | static int trm290_dma_end(ide_drive_t *drive) |
213 | { | 213 | { |
214 | u16 status; | 214 | u16 status = inw(drive->hwif->dma_base + 2); |
215 | |||
216 | drive->waiting_for_dma = 0; | ||
217 | |||
218 | status = inw(drive->hwif->dma_base + 2); | ||
219 | 215 | ||
220 | trm290_prepare_drive(drive, 0); | 216 | trm290_prepare_drive(drive, 0); |
221 | 217 | ||