aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/dma.c')
-rw-r--r--arch/powerpc/kernel/dma.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
index 41fdd48bf433..1562daf8839a 100644
--- a/arch/powerpc/kernel/dma.c
+++ b/arch/powerpc/kernel/dma.c
@@ -30,11 +30,15 @@ static unsigned long get_dma_direct_offset(struct device *dev)
30void *dma_direct_alloc_coherent(struct device *dev, size_t size, 30void *dma_direct_alloc_coherent(struct device *dev, size_t size,
31 dma_addr_t *dma_handle, gfp_t flag) 31 dma_addr_t *dma_handle, gfp_t flag)
32{ 32{
33 void *ret;
33#ifdef CONFIG_NOT_COHERENT_CACHE 34#ifdef CONFIG_NOT_COHERENT_CACHE
34 return __dma_alloc_coherent(size, dma_handle, flag); 35 ret = __dma_alloc_coherent(size, dma_handle, flag);
36 if (ret == NULL)
37 return NULL;
38 *dma_handle += get_dma_direct_offset(dev);
39 return ret;
35#else 40#else
36 struct page *page; 41 struct page *page;
37 void *ret;
38 int node = dev_to_node(dev); 42 int node = dev_to_node(dev);
39 43
40 /* ignore region specifiers */ 44 /* ignore region specifiers */