Commit e73c64e3 authored by James Bottomley's avatar James Bottomley Committed by James Bottomley

dma_alloc_coherent() still needs to support a NULL device

Fix the part of the on-chip memory API that broke this.
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 1fb418b2
......@@ -25,7 +25,7 @@ void *dma_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *dma_handle, int gfp)
{
void *ret;
struct dma_coherent_mem *mem = dev->dma_mem;
struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL;
int order = get_order(size);
/* ignore region specifiers */
gfp &= ~(__GFP_DMA | __GFP_HIGHMEM);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment