]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/sh/mm/consistent.c
Merge branches 'topic/fix/asoc', 'topic/fix/hda', 'topic/fix/misc' and 'topic/pci...
[linux-2.6-omap-h63xx.git] / arch / sh / mm / consistent.c
index 64b8f7f96f9aed038e87be11ee374d5b0797f239..9f8ea3ada4dbe845d6ff5dde86267471022e8afc 100644 (file)
 #include <asm/addrspace.h>
 #include <asm/io.h>
 
-struct dma_coherent_mem {
-       void            *virt_base;
-       u32             device_base;
-       int             size;
-       int             flags;
-       unsigned long   *bitmap;
-};
-
 void *dma_alloc_coherent(struct device *dev, size_t size,
                           dma_addr_t *dma_handle, gfp_t gfp)
 {
@@ -44,7 +36,7 @@ void *dma_alloc_coherent(struct device *dev, size_t size,
         */
        dma_cache_sync(dev, ret, size, DMA_BIDIRECTIONAL);
 
-       ret_nocache = ioremap_nocache(virt_to_phys(ret), size);
+       ret_nocache = (void __force *)ioremap_nocache(virt_to_phys(ret), size);
        if (!ret_nocache) {
                free_pages((unsigned long)ret, order);
                return NULL;
@@ -58,12 +50,10 @@ EXPORT_SYMBOL(dma_alloc_coherent);
 void dma_free_coherent(struct device *dev, size_t size,
                         void *vaddr, dma_addr_t dma_handle)
 {
-       struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL;
        int order = get_order(size);
 
        if (!dma_release_from_coherent(dev, order, vaddr)) {
                WARN_ON(irqs_disabled());       /* for portability */
-               BUG_ON(mem && mem->flags & DMA_MEMORY_EXCLUSIVE);
                free_pages((unsigned long)phys_to_virt(dma_handle), order);
                iounmap(vaddr);
        }