]> git.karo-electronics.de Git - linux-beck.git/blobdiff - arch/hexagon/include/asm/dma-mapping.h
dma-mapping: consolidate dma_{alloc,free}_noncoherent
[linux-beck.git] / arch / hexagon / include / asm / dma-mapping.h
index 16965427f6b4827d1b9807fe98248f80540e910b..58d2d8f1544acb3a5af9d88a2eec3abffdb52b3f 100644 (file)
@@ -34,9 +34,6 @@ extern int bad_dma_address;
 
 extern struct dma_map_ops *dma_ops;
 
-#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)
-
 static inline struct dma_map_ops *get_dma_ops(struct device *dev)
 {
        if (unlikely(dev == NULL))
@@ -70,37 +67,4 @@ static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
        return (dma_addr == bad_dma_address);
 }
 
-#define dma_alloc_coherent(d,s,h,f)    dma_alloc_attrs(d,s,h,f,NULL)
-
-static inline void *dma_alloc_attrs(struct device *dev, size_t size,
-                                   dma_addr_t *dma_handle, gfp_t flag,
-                                   struct dma_attrs *attrs)
-{
-       void *ret;
-       struct dma_map_ops *ops = get_dma_ops(dev);
-
-       BUG_ON(!dma_ops);
-
-       ret = ops->alloc(dev, size, dma_handle, flag, attrs);
-
-       debug_dma_alloc_coherent(dev, size, *dma_handle, ret);
-
-       return ret;
-}
-
-#define dma_free_coherent(d,s,c,h) dma_free_attrs(d,s,c,h,NULL)
-
-static inline void dma_free_attrs(struct device *dev, size_t size,
-                                 void *cpu_addr, dma_addr_t dma_handle,
-                                 struct dma_attrs *attrs)
-{
-       struct dma_map_ops *dma_ops = get_dma_ops(dev);
-
-       BUG_ON(!dma_ops);
-
-       dma_ops->free(dev, size, cpu_addr, dma_handle, attrs);
-
-       debug_dma_free_coherent(dev, size, cpu_addr, dma_handle);
-}
-
 #endif