Merge branch 'stable-3.2' into pandora-3.2
[pandora-kernel.git] / include / linux / dma-mapping.h
index 494d316..f29d342 100644 (file)
@@ -9,16 +9,15 @@
 #include <linux/scatterlist.h>
 
 struct dma_map_ops {
-       void* (*alloc_coherent)(struct device *dev, size_t size,
-                               dma_addr_t *dma_handle, gfp_t gfp);
-       void (*free_coherent)(struct device *dev, size_t size,
-                             void *vaddr, dma_addr_t dma_handle);
        void* (*alloc)(struct device *dev, size_t size,
                                dma_addr_t *dma_handle, gfp_t gfp,
                                struct dma_attrs *attrs);
        void (*free)(struct device *dev, size_t size,
                              void *vaddr, dma_addr_t dma_handle,
                              struct dma_attrs *attrs);
+       int (*mmap)(struct device *, struct vm_area_struct *,
+                         void *, dma_addr_t, size_t, struct dma_attrs *attrs);
+
        dma_addr_t (*map_page)(struct device *dev, struct page *page,
                               unsigned long offset, size_t size,
                               enum dma_data_direction dir,
@@ -136,7 +135,6 @@ static inline void *dma_zalloc_coherent(struct device *dev, size_t size,
        return ret;
 }
 
-#ifdef CONFIG_HAS_DMA
 static inline int dma_get_cache_alignment(void)
 {
 #ifdef ARCH_DMA_MINALIGN
@@ -144,7 +142,6 @@ static inline int dma_get_cache_alignment(void)
 #endif
        return 1;
 }
-#endif
 
 /* flags for the coherent memory api */
 #define        DMA_MEMORY_MAP                  0x01