git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.5.x5
[linux-2.6.git]
/
arch
/
i386
/
kernel
/
pci-dma.c
diff --git
a/arch/i386/kernel/pci-dma.c
b/arch/i386/kernel/pci-dma.c
index
982fe8c
..
7087b14
100644
(file)
--- 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;
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));
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);
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;
if(!mem)
return;
dev->dma_mem = NULL;
+ iounmap(mem->virt_base);
kfree(mem->bitmap);
kfree(mem);
}
kfree(mem->bitmap);
kfree(mem);
}