diff options
author | Sia Jee Heng <jee.heng.sia@intel.com> | 2021-01-25 04:32:41 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2021-02-01 12:38:14 +0300 |
commit | 0b9d2fb368b97823a477221649ac82d17a9af11b (patch) | |
tree | 427d1511331769b888d998e8b20d63f94ffbbeee /drivers/dma/dw-axi-dmac/dw-axi-dmac.h | |
parent | ef6fb2d6f1abd56cc067c694253ea362159b5ac3 (diff) | |
download | linux-0b9d2fb368b97823a477221649ac82d17a9af11b.tar.xz |
dmaengine: dw-axi-dmac: move dma_pool_create() to alloc_chan_resources()
The DMA memory block is created at driver load time and exist for
device lifetime. Move the dma_pool_create() to the ->chan_resource()
callback function allowing the DMA memory blocks to be created as needed
and destroyed when the channel is freed.
Signed-off-by: Sia Jee Heng <jee.heng.sia@intel.com>
Tested-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Link: https://lore.kernel.org/r/20210125013255.25799-4-jee.heng.sia@intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/dw-axi-dmac/dw-axi-dmac.h')
-rw-r--r-- | drivers/dma/dw-axi-dmac/dw-axi-dmac.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac.h b/drivers/dma/dw-axi-dmac/dw-axi-dmac.h index 41e775e6e593..f886b2bb75de 100644 --- a/drivers/dma/dw-axi-dmac/dw-axi-dmac.h +++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac.h @@ -39,6 +39,7 @@ struct axi_dma_chan { u8 id; atomic_t descs_allocated; + struct dma_pool *desc_pool; struct virt_dma_chan vc; struct axi_dma_desc *desc; @@ -49,7 +50,6 @@ struct axi_dma_chan { struct dw_axi_dma { struct dma_device dma; struct dw_axi_dma_hcfg *hdata; - struct dma_pool *desc_pool; /* channels */ struct axi_dma_chan *chan; |