From f948822b7d346f91dd61cbafc5b44a261c814642 Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Thu, 9 Aug 2007 00:22:00 +0000 Subject: [PATCH] We need to use dma_free_coherent() instead of kfree() in mite_free_ring() now. --- comedi/drivers/mite.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/comedi/drivers/mite.h b/comedi/drivers/mite.h index 1f9e4d37..07d9a3e0 100644 --- a/comedi/drivers/mite.h +++ b/comedi/drivers/mite.h @@ -100,8 +100,12 @@ static inline void mite_free_ring(struct mite_dma_descriptor_ring *ring) { if(ring) { - if(ring->descriptors) kfree(ring->descriptors); - if(ring->hw_dev) put_device(ring->hw_dev); + if(ring->descriptors) + { + dma_free_coherent(ring->hw_dev, ring->n_links * sizeof(struct mite_dma_descriptor), + ring->descriptors, ring->descriptors_dma_addr); + } + put_device(ring->hw_dev); kfree(ring); } }; -- 2.26.2