Commit f8a356ff96a9070156f863e4f7716e2a0eb8c995
1 parent
97a43dfe84
Exists in
master
and in
39 other branches
dmaengine i.MX dma: initialize dma capabilities outside channel loop
The capabilities are device specific fields, not channel specific fields. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff
drivers/dma/imx-dma.c
... | ... | @@ -345,6 +345,9 @@ |
345 | 345 | |
346 | 346 | INIT_LIST_HEAD(&imxdma->dma_device.channels); |
347 | 347 | |
348 | + dma_cap_set(DMA_SLAVE, imxdma->dma_device.cap_mask); | |
349 | + dma_cap_set(DMA_CYCLIC, imxdma->dma_device.cap_mask); | |
350 | + | |
348 | 351 | /* Initialize channel parameters */ |
349 | 352 | for (i = 0; i < MAX_DMA_CHANNELS; i++) { |
350 | 353 | struct imxdma_channel *imxdmac = &imxdma->channel[i]; |
... | ... | @@ -361,9 +364,6 @@ |
361 | 364 | |
362 | 365 | imxdmac->imxdma = imxdma; |
363 | 366 | spin_lock_init(&imxdmac->lock); |
364 | - | |
365 | - dma_cap_set(DMA_SLAVE, imxdma->dma_device.cap_mask); | |
366 | - dma_cap_set(DMA_CYCLIC, imxdma->dma_device.cap_mask); | |
367 | 367 | |
368 | 368 | imxdmac->chan.device = &imxdma->dma_device; |
369 | 369 | imxdmac->channel = i; |