diff options
author | Nicolas Ferre <nicolas.ferre@atmel.com> | 2009-07-06 12:19:44 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2009-07-23 01:11:28 -0400 |
commit | f1aef8b6e6abf32a3a269542f95a19e2cb319f6c (patch) | |
tree | f364595263d6c99487bbbcfb4767326694bb2aff | |
parent | 0a2ff57d6fba92842272889b4bca447344cd9d36 (diff) |
dmaengine: dmatest: correct thread_count while using multiple thread per channel
It seems that thread_count is not properly calculated in dmatest.
In fact the thread count number that is returned from dmatest_add_threads() is
not correctly added to the thread_count and thus not properly printed.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Acked-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
-rw-r--r-- | drivers/dma/dmatest.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c index 2d973d60e7b9..d93017fc7872 100644 --- a/drivers/dma/dmatest.c +++ b/drivers/dma/dmatest.c | |||
@@ -508,11 +508,11 @@ static int dmatest_add_channel(struct dma_chan *chan) | |||
508 | 508 | ||
509 | if (dma_has_cap(DMA_MEMCPY, dma_dev->cap_mask)) { | 509 | if (dma_has_cap(DMA_MEMCPY, dma_dev->cap_mask)) { |
510 | cnt = dmatest_add_threads(dtc, DMA_MEMCPY); | 510 | cnt = dmatest_add_threads(dtc, DMA_MEMCPY); |
511 | thread_count += cnt > 0 ?: 0; | 511 | thread_count += cnt > 0 ? cnt : 0; |
512 | } | 512 | } |
513 | if (dma_has_cap(DMA_XOR, dma_dev->cap_mask)) { | 513 | if (dma_has_cap(DMA_XOR, dma_dev->cap_mask)) { |
514 | cnt = dmatest_add_threads(dtc, DMA_XOR); | 514 | cnt = dmatest_add_threads(dtc, DMA_XOR); |
515 | thread_count += cnt > 0 ?: 0; | 515 | thread_count += cnt > 0 ? cnt : 0; |
516 | } | 516 | } |
517 | 517 | ||
518 | pr_info("dmatest: Started %u threads using %s\n", | 518 | pr_info("dmatest: Started %u threads using %s\n", |