Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752498AbdGEHM3 (ORCPT ); Wed, 5 Jul 2017 03:12:29 -0400 Received: from mail-pg0-f42.google.com ([74.125.83.42]:34235 "EHLO mail-pg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752414AbdGEHM0 (ORCPT ); Wed, 5 Jul 2017 03:12:26 -0400 From: Tomasz Figa To: iommu@lists.linux-foundation.org Cc: linux-kernel@vger.kernel.org, Christoph Hellwig , Marek Szyprowski , Robin Murphy , Greg Kroah-Hartman , Joerg Roedel , Will Deacon , Vineet Gupta , Hans-Christian Noren Egtvedt , Mitchel Humpherys , Krzysztof Kozlowski , Arnd Bergmann , Tomasz Figa Subject: [RFC PATCH 1/5] base: dma-mapping: Export commonly used symbols Date: Wed, 5 Jul 2017 16:12:11 +0900 Message-Id: <20170705071215.17603-2-tfiga@chromium.org> X-Mailer: git-send-email 2.13.2.725.g09c95d1e9-goog In-Reply-To: <20170705071215.17603-1-tfiga@chromium.org> References: <20170705071215.17603-1-tfiga@chromium.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1475 Lines: 44 There is nothing wrong in having a loadable module implementing DMA API, for example to be used for sub-devices registered by the module. However, most of the functions from dma-mapping do not have their symbols exported, making it impossible to use them from loadable modules. Export the remaining non-static functions in the file, so that loadable modules can benefit from them. Use EXPORT_SYMBOL() for consistency with other exports in the file. Signed-off-by: Tomasz Figa --- drivers/base/dma-mapping.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/base/dma-mapping.c b/drivers/base/dma-mapping.c index 5096755d185e..1fda8df3d849 100644 --- a/drivers/base/dma-mapping.c +++ b/drivers/base/dma-mapping.c @@ -287,6 +287,7 @@ void *dma_common_pages_remap(struct page **pages, size_t size, return area->addr; } +EXPORT_SYMBOL(dma_common_pages_remap); /* * remaps an allocated contiguous region into another vm_area. @@ -316,6 +317,7 @@ void *dma_common_contiguous_remap(struct page *page, size_t size, return NULL; return area->addr; } +EXPORT_SYMBOL(dma_common_contiguous_remap); /* * unmaps a range previously mapped by dma_common_*_remap @@ -332,6 +334,7 @@ void dma_common_free_remap(void *cpu_addr, size_t size, unsigned long vm_flags) unmap_kernel_range((unsigned long)cpu_addr, PAGE_ALIGN(size)); vunmap(cpu_addr); } +EXPORT_SYMBOL(dma_common_free_remap); #endif /* -- 2.13.2.725.g09c95d1e9-goog