diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2012-12-16 12:27:33 -0500 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2012-12-25 14:14:54 -0500 |
commit | aaf4f97f267aa0dbc42f089b33325e61aac8622e (patch) | |
tree | e39e334701985aaecc1ead908cf5943ced8c3e33 /include | |
parent | 4a09ab6771276a7fd3f80be4250a0fd0ba5114ad (diff) |
asm-generic/dma-mapping-broken.h: Provide dma_alloc_attrs()/dma_free_attrs()
Since commit 0049fb2603b7afb1080776ee691dfa5a3d282357 ("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>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-generic/dma-mapping-broken.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/asm-generic/dma-mapping-broken.h b/include/asm-generic/dma-mapping-broken.h index ccf7b4f34a3c..6c32af918c2f 100644 --- a/include/asm-generic/dma-mapping-broken.h +++ b/include/asm-generic/dma-mapping-broken.h | |||
@@ -16,6 +16,22 @@ extern void | |||
16 | dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, | 16 | dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, |
17 | dma_addr_t dma_handle); | 17 | dma_addr_t dma_handle); |
18 | 18 | ||
19 | static inline void *dma_alloc_attrs(struct device *dev, size_t size, | ||
20 | dma_addr_t *dma_handle, gfp_t flag, | ||
21 | struct dma_attrs *attrs) | ||
22 | { | ||
23 | /* attrs is not supported and ignored */ | ||
24 | return dma_alloc_coherent(dev, size, dma_handle, flag); | ||
25 | } | ||
26 | |||
27 | static inline void dma_free_attrs(struct device *dev, size_t size, | ||
28 | void *cpu_addr, dma_addr_t dma_handle, | ||
29 | struct dma_attrs *attrs) | ||
30 | { | ||
31 | /* attrs is not supported and ignored */ | ||
32 | dma_free_coherent(dev, size, cpu_addr, dma_handle); | ||
33 | } | ||
34 | |||
19 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) | 35 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) |
20 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) | 36 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) |
21 | 37 | ||