diff options
Diffstat (limited to 'drivers/dma/dmatest.c')
-rw-r--r-- | drivers/dma/dmatest.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c index 948d563941c9..6fa55fe3dd24 100644 --- a/drivers/dma/dmatest.c +++ b/drivers/dma/dmatest.c | |||
@@ -237,7 +237,7 @@ static int dmatest_func(void *data) | |||
237 | dma_cookie_t cookie; | 237 | dma_cookie_t cookie; |
238 | enum dma_status status; | 238 | enum dma_status status; |
239 | enum dma_ctrl_flags flags; | 239 | enum dma_ctrl_flags flags; |
240 | u8 pq_coefs[pq_sources]; | 240 | u8 pq_coefs[pq_sources + 1]; |
241 | int ret; | 241 | int ret; |
242 | int src_cnt; | 242 | int src_cnt; |
243 | int dst_cnt; | 243 | int dst_cnt; |
@@ -257,7 +257,7 @@ static int dmatest_func(void *data) | |||
257 | } else if (thread->type == DMA_PQ) { | 257 | } else if (thread->type == DMA_PQ) { |
258 | src_cnt = pq_sources | 1; /* force odd to ensure dst = src */ | 258 | src_cnt = pq_sources | 1; /* force odd to ensure dst = src */ |
259 | dst_cnt = 2; | 259 | dst_cnt = 2; |
260 | for (i = 0; i < pq_sources; i++) | 260 | for (i = 0; i < src_cnt; i++) |
261 | pq_coefs[i] = 1; | 261 | pq_coefs[i] = 1; |
262 | } else | 262 | } else |
263 | goto err_srcs; | 263 | goto err_srcs; |
@@ -347,7 +347,7 @@ static int dmatest_func(void *data) | |||
347 | else if (thread->type == DMA_XOR) | 347 | else if (thread->type == DMA_XOR) |
348 | tx = dev->device_prep_dma_xor(chan, | 348 | tx = dev->device_prep_dma_xor(chan, |
349 | dma_dsts[0] + dst_off, | 349 | dma_dsts[0] + dst_off, |
350 | dma_srcs, xor_sources, | 350 | dma_srcs, src_cnt, |
351 | len, flags); | 351 | len, flags); |
352 | else if (thread->type == DMA_PQ) { | 352 | else if (thread->type == DMA_PQ) { |
353 | dma_addr_t dma_pq[dst_cnt]; | 353 | dma_addr_t dma_pq[dst_cnt]; |
@@ -355,7 +355,7 @@ static int dmatest_func(void *data) | |||
355 | for (i = 0; i < dst_cnt; i++) | 355 | for (i = 0; i < dst_cnt; i++) |
356 | dma_pq[i] = dma_dsts[i] + dst_off; | 356 | dma_pq[i] = dma_dsts[i] + dst_off; |
357 | tx = dev->device_prep_dma_pq(chan, dma_pq, dma_srcs, | 357 | tx = dev->device_prep_dma_pq(chan, dma_pq, dma_srcs, |
358 | pq_sources, pq_coefs, | 358 | src_cnt, pq_coefs, |
359 | len, flags); | 359 | len, flags); |
360 | } | 360 | } |
361 | 361 | ||