From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751342AbaJOUcx (ORCPT ); Wed, 15 Oct 2014 16:32:53 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:33869 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750721AbaJOUcw (ORCPT ); Wed, 15 Oct 2014 16:32:52 -0400 From: Felipe Balbi To: Greg KH CC: Linux Kernel Mailing List , Felipe Balbi , Marek Szyprowski , Arnd Bergmann , Michal Nazarewicz , Grant Likely , Laura Abbott , Josh Cartwright , Joonsoo Kim , Kyungmin Park , Andrew Morton Subject: [PATCH] base: dma-coherent: fix device_init initialization Date: Wed, 15 Oct 2014 15:32:20 -0500 Message-ID: <1413405140-17777-1-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.1.0.GIT MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org commit 7bfa5ab (drivers: dma-coherent: add initialization from device tree) added support for dma coherent pool for DeviceTree. Unfortunately that commit introduced a new build warning because of a wrong type on the definition of ->device_init(). This patch fixes it. Cc: Marek Szyprowski Cc: Arnd Bergmann Cc: Michal Nazarewicz Cc: Grant Likely Cc: Laura Abbott Cc: Josh Cartwright Cc: Joonsoo Kim Cc: Kyungmin Park Cc: Andrew Morton Fixes: 7bfa5ab6 (drivers: dma-coherent: add initialization from device tree) Signed-off-by: Felipe Balbi --- drivers/base/dma-coherent.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/base/dma-coherent.c b/drivers/base/dma-coherent.c index 55b8398..d3695a8 100644 --- a/drivers/base/dma-coherent.c +++ b/drivers/base/dma-coherent.c @@ -276,7 +276,7 @@ EXPORT_SYMBOL(dma_mmap_from_coherent); #include #include -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,10 @@ 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; } static void rmem_dma_device_release(struct reserved_mem *rmem, -- 2.1.0.GIT