* [PATCH] 2.6.8.1-mm3: nsc-ircc driver crashes on shutdown
@ 2004-08-22 15:03 Petr Vandrovec
0 siblings, 0 replies; only message in thread
From: Petr Vandrovec @ 2004-08-22 15:03 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel
Hi,
bk-dma-decleare-coherent-memory patch adds a requirement for dma_free_coherent
that dev cannot be NULL... But it can (nsc-ircc has no suitable dev) and as
dma_alloc_coherent allows NULL dev, dma_free_coherent should allow it too
IMHO.
Thanks,
Petr Vandrovec
diff -urN linux/arch/i386/kernel/pci-dma.c linux/arch/i386/kernel/pci-dma.c
--- linux/arch/i386/kernel/pci-dma.c 2004-08-21 00:51:49.000000000 +0200
+++ linux/arch/i386/kernel/pci-dma.c 2004-08-21 13:51:03.000000000 +0200
@@ -58,7 +58,7 @@
void dma_free_coherent(struct device *dev, size_t size,
void *vaddr, dma_addr_t dma_handle)
{
- struct dma_coherent_mem *mem = dev->dma_mem;
+ struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL;
int order = get_order(size);
if (mem && vaddr >= mem->virt_base && vaddr < (mem->virt_base + (mem->size << PAGE_SHIFT))) {
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-08-22 15:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-22 15:03 [PATCH] 2.6.8.1-mm3: nsc-ircc driver crashes on shutdown Petr Vandrovec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®