From: Frank Mori Hess Date: Thu, 9 Aug 2007 00:22:00 +0000 (+0000) Subject: We need to use dma_free_coherent() instead of kfree() in mite_free_ring() X-Git-Tag: r0_7_75~55 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f948822b7d346f91dd61cbafc5b44a261c814642;p=comedi.git We need to use dma_free_coherent() instead of kfree() in mite_free_ring() now. --- 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); } };