From: Glauber Costa Date: Tue, 8 Apr 2008 16:20:59 +0000 (-0300) Subject: x86: adjust dma_free_coherent for i386 X-Git-Tag: v2.6.26-rc1~1133^2~11 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=2e33e361188617628e47b4bc47e87e84feaf556f;p=linux-2.6-omap-h63xx.git x86: adjust dma_free_coherent for i386 We call unmap_single, if available. Signed-off-by: Glauber Costa Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- diff --git a/arch/x86/kernel/pci-dma_32.c b/arch/x86/kernel/pci-dma_32.c index 9199bccb921..5ae3470113c 100644 --- a/arch/x86/kernel/pci-dma_32.c +++ b/arch/x86/kernel/pci-dma_32.c @@ -80,6 +80,8 @@ void dma_free_coherent(struct device *dev, size_t size, WARN_ON(irqs_disabled()); /* for portability */ if (dma_release_coherent(dev, order, vaddr)) return; + if (dma_ops->unmap_single) + dma_ops->unmap_single(dev, dma_handle, size, 0); free_pages((unsigned long)vaddr, order); } EXPORT_SYMBOL(dma_free_coherent);