projects
/
comedi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1755117
)
We need to use dma_free_coherent() instead of kfree() in mite_free_ring()
author
Frank Mori Hess
<fmhess@speakeasy.net>
Thu, 9 Aug 2007 00:22:00 +0000
(
00:22
+0000)
committer
Frank Mori Hess
<fmhess@speakeasy.net>
Thu, 9 Aug 2007 00:22:00 +0000
(
00:22
+0000)
now.
comedi/drivers/mite.h
patch
|
blob
|
history
diff --git
a/comedi/drivers/mite.h
b/comedi/drivers/mite.h
index 1f9e4d3747f8746f41a1db0a934ee66764f7a976..07d9a3e0ac304e4f1bd706275e6ea48988ab62a6 100644
(file)
--- 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);
}
};