dma-mapping: Remove exposure of dma_get_[base/size]
Now that dma_get_[base/size] are not needed by other drivers, remove the implementation of dma_get_size(), and limit the scope of dma_get_base() to its original visibility. Change-Id: I38d6024b43608743217ebfd44a35ccb4da714386 Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
This commit is contained in:
parent
6f7e72d4e8
commit
afa801ec6c
@ -803,31 +803,15 @@ static inline int dma_get_cache_alignment(void)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DMA_DECLARE_COHERENT
|
||||
struct dma_coherent_mem;
|
||||
int dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr,
|
||||
dma_addr_t device_addr, size_t size);
|
||||
dma_addr_t dma_get_device_base(struct device *dev,
|
||||
struct dma_coherent_mem *mem);
|
||||
unsigned long dma_get_size(struct dma_coherent_mem *mem);
|
||||
#else
|
||||
struct dma_coherent_mem {};
|
||||
static inline int
|
||||
dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr,
|
||||
dma_addr_t device_addr, size_t size)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static inline dma_addr_t dma_get_device_base(struct device *dev,
|
||||
struct dma_coherent_mem *mem)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline unsigned long dma_get_size(struct dma_coherent_mem *mem)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_DMA_DECLARE_COHERENT */
|
||||
|
||||
static inline void *dmam_alloc_coherent(struct device *dev, size_t size,
|
||||
|
@ -28,7 +28,7 @@ static inline struct dma_coherent_mem *dev_get_coherent_memory(struct device *de
|
||||
return NULL;
|
||||
}
|
||||
|
||||
dma_addr_t dma_get_device_base(struct device *dev,
|
||||
static inline dma_addr_t dma_get_device_base(struct device *dev,
|
||||
struct dma_coherent_mem * mem)
|
||||
{
|
||||
if (mem->use_dev_dma_pfn_offset)
|
||||
@ -37,11 +37,6 @@ dma_addr_t dma_get_device_base(struct device *dev,
|
||||
return mem->device_base;
|
||||
}
|
||||
|
||||
unsigned long dma_get_size(struct dma_coherent_mem *mem)
|
||||
{
|
||||
return mem->size << PAGE_SHIFT;
|
||||
}
|
||||
|
||||
static int dma_init_coherent_memory(phys_addr_t phys_addr,
|
||||
dma_addr_t device_addr, size_t size,
|
||||
struct dma_coherent_mem **mem)
|
||||
|
Loading…
Reference in New Issue
Block a user