From: Christoph Hellwig Date: Fri, 30 Aug 2019 06:46:57 +0000 (+0200) Subject: dma-mapping: remove dma_release_declared_memory X-Git-Tag: v5.4-rc1~113^2~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1fa0682448acd5198f79c1d28ee1292a27ae406d;p=platform%2Fkernel%2Flinux-rpi.git dma-mapping: remove dma_release_declared_memory This function is entirely unused given that declared memory is generally provided by platform setup code. Signed-off-by: Christoph Hellwig --- diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt index 9c4dd3d..2d8d2fe 100644 --- a/Documentation/DMA-API.txt +++ b/Documentation/DMA-API.txt @@ -603,17 +603,6 @@ For reasons of efficiency, most platforms choose to track the declared region only at the granularity of a page. For smaller allocations, you should use the dma_pool() API. -:: - - void - dma_release_declared_memory(struct device *dev) - -Remove the memory region previously declared from the system. This -API performs *no* in-use checking for this region and will return -unconditionally having removed all the required structures. It is the -driver's job to ensure that no parts of this memory region are -currently in use. - Part III - Debug drivers use of the DMA-API ------------------------------------------- diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 41d4e91..80063b0 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -764,7 +764,6 @@ static inline int dma_get_cache_alignment(void) #ifdef CONFIG_DMA_DECLARE_COHERENT int dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr, dma_addr_t device_addr, size_t size); -void dma_release_declared_memory(struct device *dev); #else static inline int dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr, @@ -772,11 +771,6 @@ dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr, { return -ENOSYS; } - -static inline void -dma_release_declared_memory(struct device *dev) -{ -} #endif /* CONFIG_DMA_DECLARE_COHERENT */ static inline void *dmam_alloc_coherent(struct device *dev, size_t size, diff --git a/kernel/dma/coherent.c b/kernel/dma/coherent.c index 29fd659..7271cda 100644 --- a/kernel/dma/coherent.c +++ b/kernel/dma/coherent.c @@ -124,17 +124,6 @@ int dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr, } EXPORT_SYMBOL(dma_declare_coherent_memory); -void dma_release_declared_memory(struct device *dev) -{ - struct dma_coherent_mem *mem = dev->dma_mem; - - if (!mem) - return; - dma_release_coherent_memory(mem); - dev->dma_mem = NULL; -} -EXPORT_SYMBOL(dma_release_declared_memory); - static void *__dma_alloc_from_coherent(struct dma_coherent_mem *mem, ssize_t size, dma_addr_t *dma_handle) {