Skip to content

Commit

Permalink
firewire: core: fix DMA unmapping in iso buffer removal
Browse files Browse the repository at this point in the history
dmap_unmap_page() shall use the same direction as dma_map_page().

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
  • Loading branch information
Stefan Richter committed Jun 16, 2009
1 parent 1337f85 commit 29ad14c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/firewire/core-iso.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ int fw_iso_buffer_init(struct fw_iso_buffer *buffer, struct fw_card *card,
for (j = 0; j < i; j++) {
address = page_private(buffer->pages[j]);
dma_unmap_page(card->device, address,
PAGE_SIZE, DMA_TO_DEVICE);
PAGE_SIZE, direction);
__free_page(buffer->pages[j]);
}
kfree(buffer->pages);
Expand Down Expand Up @@ -108,7 +108,7 @@ void fw_iso_buffer_destroy(struct fw_iso_buffer *buffer,
for (i = 0; i < buffer->page_count; i++) {
address = page_private(buffer->pages[i]);
dma_unmap_page(card->device, address,
PAGE_SIZE, DMA_TO_DEVICE);
PAGE_SIZE, buffer->direction);
__free_page(buffer->pages[i]);
}

Expand Down

0 comments on commit 29ad14c

Please sign in to comment.