summaryrefslogtreecommitdiff
path: root/drivers/dma/at_hdmac_regs.h
diff options
context:
space:
mode:
authorTudor Ambarus <tudor.ambarus@microchip.com>2020-01-23 14:03:06 +0000
committerVinod Koul <vkoul@kernel.org>2020-02-25 11:27:27 +0530
commitad16bc232dd72f85984c790e07c69009b7c850c8 (patch)
tree5bbe4d155f66038df71ac4f10309e776816cafbe /drivers/dma/at_hdmac_regs.h
parentbbc58394d81110f76586d3053fd5a3a3ad616050 (diff)
dmaengine: at_hdmac: Return err in case the chan is not free at alloc res time
Having a list of descriptors allocated for the channel at device_alloc_chan_resources() time is a sign for bad free usage. Return err and add a debug message in case the channel is not free from a previous use. atchan->descs_allocated becomes useless, get rid of it. More, drop the error message in atc_desc_get() because now it would introduce an extra if statement. The callers of atc_desc_get() already print error messages in case the callee fails, no one is hurt. Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com> Link: https://lore.kernel.org/r/20200123140237.125799-3-tudor.ambarus@microchip.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/at_hdmac_regs.h')
-rw-r--r--drivers/dma/at_hdmac_regs.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/dma/at_hdmac_regs.h b/drivers/dma/at_hdmac_regs.h
index fe8a5853ec49..397692e937b3 100644
--- a/drivers/dma/at_hdmac_regs.h
+++ b/drivers/dma/at_hdmac_regs.h
@@ -243,7 +243,6 @@ enum atc_status {
* @active_list: list of descriptors dmaengine is being running on
* @queue: list of descriptors ready to be submitted to engine
* @free_list: list of descriptors usable by the channel
- * @descs_allocated: records the actual size of the descriptor pool
*/
struct at_dma_chan {
struct dma_chan chan_common;
@@ -264,7 +263,6 @@ struct at_dma_chan {
struct list_head active_list;
struct list_head queue;
struct list_head free_list;
- unsigned int descs_allocated;
};
#define channel_readl(atchan, name) \