diff options
author | Ezequiel Garcia <ezequiel.garcia@free-electrons.com> | 2014-03-07 14:46:47 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2014-04-10 15:26:17 -0400 |
commit | fbeec99ad5c03060ba71c470ac373e24e23a80e0 (patch) | |
tree | 2e5c854305f8f21a53be5a19e57fc442856e624e /drivers/dma | |
parent | e43147acba6f64ba32664dd0e590657cc49b6940 (diff) |
dma: mv_xor: Rename __mv_xor_slot_cleanup() to mv_xor_slot_cleanup()
Now that mv_xor_slot_cleanup() has no remaining callers, we remove it
and rename __mv_xor_slot_cleanup() to mv_xor_slot_cleanup().
We take this opportunity to add a comment that makes it clear that the
channel spinlock should be held before calling mv_xor_slot_cleanup().
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/mv_xor.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c index fad016a6dd84..8eca90d8cd4c 100644 --- a/drivers/dma/mv_xor.c +++ b/drivers/dma/mv_xor.c | |||
@@ -312,7 +312,8 @@ mv_xor_clean_slot(struct mv_xor_desc_slot *desc, | |||
312 | return 0; | 312 | return 0; |
313 | } | 313 | } |
314 | 314 | ||
315 | static void __mv_xor_slot_cleanup(struct mv_xor_chan *mv_chan) | 315 | /* This function must be called with the mv_xor_chan spinlock held */ |
316 | static void mv_xor_slot_cleanup(struct mv_xor_chan *mv_chan) | ||
316 | { | 317 | { |
317 | struct mv_xor_desc_slot *iter, *_iter; | 318 | struct mv_xor_desc_slot *iter, *_iter; |
318 | dma_cookie_t cookie = 0; | 319 | dma_cookie_t cookie = 0; |
@@ -368,20 +369,12 @@ static void __mv_xor_slot_cleanup(struct mv_xor_chan *mv_chan) | |||
368 | mv_chan->dmachan.completed_cookie = cookie; | 369 | mv_chan->dmachan.completed_cookie = cookie; |
369 | } | 370 | } |
370 | 371 | ||
371 | static void | ||
372 | mv_xor_slot_cleanup(struct mv_xor_chan *mv_chan) | ||
373 | { | ||
374 | spin_lock_bh(&mv_chan->lock); | ||
375 | __mv_xor_slot_cleanup(mv_chan); | ||
376 | spin_unlock_bh(&mv_chan->lock); | ||
377 | } | ||
378 | |||
379 | static void mv_xor_tasklet(unsigned long data) | 372 | static void mv_xor_tasklet(unsigned long data) |
380 | { | 373 | { |
381 | struct mv_xor_chan *chan = (struct mv_xor_chan *) data; | 374 | struct mv_xor_chan *chan = (struct mv_xor_chan *) data; |
382 | 375 | ||
383 | spin_lock_bh(&chan->lock); | 376 | spin_lock_bh(&chan->lock); |
384 | __mv_xor_slot_cleanup(chan); | 377 | mv_xor_slot_cleanup(chan); |
385 | spin_unlock_bh(&chan->lock); | 378 | spin_unlock_bh(&chan->lock); |
386 | } | 379 | } |
387 | 380 | ||
@@ -663,7 +656,7 @@ static void mv_xor_free_chan_resources(struct dma_chan *chan) | |||
663 | 656 | ||
664 | spin_lock_bh(&mv_chan->lock); | 657 | spin_lock_bh(&mv_chan->lock); |
665 | 658 | ||
666 | __mv_xor_slot_cleanup(mv_chan); | 659 | mv_xor_slot_cleanup(mv_chan); |
667 | 660 | ||
668 | list_for_each_entry_safe(iter, _iter, &mv_chan->chain, | 661 | list_for_each_entry_safe(iter, _iter, &mv_chan->chain, |
669 | chain_node) { | 662 | chain_node) { |
@@ -710,7 +703,7 @@ static enum dma_status mv_xor_status(struct dma_chan *chan, | |||
710 | return ret; | 703 | return ret; |
711 | 704 | ||
712 | spin_lock_bh(&mv_chan->lock); | 705 | spin_lock_bh(&mv_chan->lock); |
713 | __mv_xor_slot_cleanup(mv_chan); | 706 | mv_xor_slot_cleanup(mv_chan); |
714 | spin_unlock_bh(&mv_chan->lock); | 707 | spin_unlock_bh(&mv_chan->lock); |
715 | 708 | ||
716 | return dma_cookie_status(chan, cookie, txstate); | 709 | return dma_cookie_status(chan, cookie, txstate); |