X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fi386%2Fkernel%2Fpci-dma.c;h=7087b1415f64cab3d08103bea2027f0396358e15;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=982fe8c2b87588187a63dec4001f677d159f1d54;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/arch/i386/kernel/pci-dma.c b/arch/i386/kernel/pci-dma.c index 982fe8c2b..7087b1415 100644 --- a/arch/i386/kernel/pci-dma.c +++ b/arch/i386/kernel/pci-dma.c @@ -89,11 +89,11 @@ int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, if (!mem_base) goto out; - dev->dma_mem = kmalloc(GFP_KERNEL, sizeof(struct dma_coherent_mem)); + dev->dma_mem = kmalloc(sizeof(struct dma_coherent_mem), GFP_KERNEL); if (!dev->dma_mem) goto out; memset(dev->dma_mem, 0, sizeof(struct dma_coherent_mem)); - dev->dma_mem->bitmap = kmalloc(GFP_KERNEL, bitmap_size); + dev->dma_mem->bitmap = kmalloc(bitmap_size, GFP_KERNEL); if (!dev->dma_mem->bitmap) goto free1_out; memset(dev->dma_mem->bitmap, 0, bitmap_size); @@ -122,6 +122,7 @@ void dma_release_declared_memory(struct device *dev) if(!mem) return; dev->dma_mem = NULL; + iounmap(mem->virt_base); kfree(mem->bitmap); kfree(mem); }