Skip to content

Commit

Permalink
ide/arm/icside: fallout from commit 86f3a49
Browse files Browse the repository at this point in the history
struct device doesn't have ->dma; it's in struct expansion_card where
that struct device is embedded into.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Al Viro authored and Linus Torvalds committed Oct 28, 2007
1 parent 9e6a76b commit 4a66fca
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions drivers/ide/arm/icside.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,13 @@ static int icside_dma_end(ide_drive_t *drive)

drive->waiting_for_dma = 0;

disable_dma(state->dev->dma);
disable_dma(ECARD_DEV(state->dev)->dma);

/* Teardown mappings after DMA has completed. */
dma_unmap_sg(state->dev, hwif->sg_table, hwif->sg_nents,
hwif->sg_dma_direction);

return get_dma_residue(state->dev->dma) != 0;
return get_dma_residue(ECARD_DEV(state->dev)->dma) != 0;
}

static void icside_dma_start(ide_drive_t *drive)
Expand All @@ -331,8 +331,8 @@ static void icside_dma_start(ide_drive_t *drive)
struct icside_state *state = hwif->hwif_data;

/* We can not enable DMA on both channels simultaneously. */
BUG_ON(dma_channel_active(state->dev->dma));
enable_dma(state->dev->dma);
BUG_ON(dma_channel_active(ECARD_DEV(state->dev)->dma));
enable_dma(ECARD_DEV(state->dev)->dma);
}

static int icside_dma_setup(ide_drive_t *drive)
Expand All @@ -350,7 +350,7 @@ static int icside_dma_setup(ide_drive_t *drive)
/*
* We can not enable DMA on both channels.
*/
BUG_ON(dma_channel_active(state->dev->dma));
BUG_ON(dma_channel_active(ECARD_DEV(state->dev)->dma));

icside_build_sglist(drive, rq);

Expand All @@ -367,14 +367,14 @@ static int icside_dma_setup(ide_drive_t *drive)
/*
* Select the correct timing for this drive.
*/
set_dma_speed(state->dev->dma, drive->drive_data);
set_dma_speed(ECARD_DEV(state->dev)->dma, drive->drive_data);

/*
* Tell the DMA engine about the SG table and
* data direction.
*/
set_dma_sg(state->dev->dma, hwif->sg_table, hwif->sg_nents);
set_dma_mode(state->dev->dma, dma_mode);
set_dma_sg(ECARD_DEV(state->dev)->dma, hwif->sg_table, hwif->sg_nents);
set_dma_mode(ECARD_DEV(state->dev)->dma, dma_mode);

drive->waiting_for_dma = 1;

Expand Down

0 comments on commit 4a66fca

Please sign in to comment.