diff options
authorAl Stone <ahs3@redhat.com>2014-11-04 15:09:38 -0700
committerGraeme Gregory <graeme.gregory@linaro.org>2014-11-06 12:00:51 +0000
commitcc2a78c7e62390572dbc2612b7b0a9298658c117 (patch)
parent8716fe6271cd80291c1281fb32f37599c8c76bc2 (diff)
drivers/base: correct function prototype to remove compiler warning
Ended up with this compiler warning: CC drivers/base/dma-coherent.o drivers/base/dma-coherent.c:303:2: warning: initialization from incompatible pointer type .device_init = rmem_dma_device_init, ^ drivers/base/dma-coherent.c:303:2: warning: (near initialization for ‘rmem_dma_ops.device_init’) Correct the function definition for rmem_dma_device_init to match what's required for a reserved_mem struct. Signed-off-by: Al Stone <al.stone@linaro.org>
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/base/dma-coherent.c b/drivers/base/dma-coherent.c
index 55b83983a9c0..3fac4d6618c1 100644
--- a/drivers/base/dma-coherent.c
+++ b/drivers/base/dma-coherent.c
@@ -276,7 +276,7 @@ EXPORT_SYMBOL(dma_mmap_from_coherent);
#include <linux/of_fdt.h>
#include <linux/of_reserved_mem.h>
-static int rmem_dma_device_init(struct reserved_mem *rmem, struct device *dev)
+static void rmem_dma_device_init(struct reserved_mem *rmem, struct device *dev)
struct dma_coherent_mem *mem = rmem->priv;
@@ -286,11 +286,11 @@ static int rmem_dma_device_init(struct reserved_mem *rmem, struct device *dev)
&mem) != DMA_MEMORY_MAP) {
pr_err("Reserved memory: failed to init DMA memory pool at %pa, size %ld MiB\n",
&rmem->base, (unsigned long)rmem->size / SZ_1M);
- return -ENODEV;
+ return;
rmem->priv = mem;
dma_assign_coherent_memory(dev, mem);
- return 0;
+ return;
static void rmem_dma_device_release(struct reserved_mem *rmem,