dmaengine: dw-axi-dmac: move dma_pool_create() to alloc_chan_resources()
authorSia Jee Heng <jee.heng.sia@intel.com>
Mon, 25 Jan 2021 01:32:41 +0000 (09:32 +0800)
committerVinod Koul <vkoul@kernel.org>
Mon, 1 Feb 2021 09:38:14 +0000 (15:08 +0530)
commit0b9d2fb368b97823a477221649ac82d17a9af11b
tree427d1511331769b888d998e8b20d63f94ffbbeee
parentef6fb2d6f1abd56cc067c694253ea362159b5ac3
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>
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
drivers/dma/dw-axi-dmac/dw-axi-dmac.h