mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 05:34:13 +08:00
asm-generic/dma-mapping-broken.h: Provide dma_alloc_attrs()/dma_free_attrs()
Since commit 0049fb2603
("OMAPFB: use
dma_alloc_attrs to allocate memory") we have one non-arch user of
dma_{alloc,free}_attrs().
Hence provide these functions, as wrappers around
dma_{alloc,free}_coherent().
Note that most architectures do it the other way around. But as these are
dummy functions, we don't care.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
parent
4a09ab6771
commit
aaf4f97f26
@ -16,6 +16,22 @@ extern void
|
|||||||
dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
|
dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
|
||||||
dma_addr_t dma_handle);
|
dma_addr_t dma_handle);
|
||||||
|
|
||||||
|
static inline void *dma_alloc_attrs(struct device *dev, size_t size,
|
||||||
|
dma_addr_t *dma_handle, gfp_t flag,
|
||||||
|
struct dma_attrs *attrs)
|
||||||
|
{
|
||||||
|
/* attrs is not supported and ignored */
|
||||||
|
return dma_alloc_coherent(dev, size, dma_handle, flag);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void dma_free_attrs(struct device *dev, size_t size,
|
||||||
|
void *cpu_addr, dma_addr_t dma_handle,
|
||||||
|
struct dma_attrs *attrs)
|
||||||
|
{
|
||||||
|
/* attrs is not supported and ignored */
|
||||||
|
dma_free_coherent(dev, size, cpu_addr, dma_handle);
|
||||||
|
}
|
||||||
|
|
||||||
#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
|
#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
|
||||||
#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
|
#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user