Skip to content

Commit

Permalink
x86: gart alloc_coherent doesn't need to check NULL device argument
Browse files Browse the repository at this point in the history
asm/dma-mapping.h guarantees that gart alloc_coherent doesn't get NULL
device argument.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
FUJITA Tomonori authored and Ingo Molnar committed Sep 5, 2008
1 parent 421076e commit 551b454
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions arch/x86/kernel/pci-gart_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,9 +506,6 @@ gart_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_addr,

align_mask = (1UL << get_order(size)) - 1;

if (!dev)
dev = &x86_dma_fallback_dev;

*dma_addr = dma_map_area(dev, __pa(vaddr), size, DMA_BIDIRECTIONAL,
align_mask);
flush_gart();
Expand Down

0 comments on commit 551b454

Please sign in to comment.