drivers: dma: stm32 initialize a dma_stm32_data structure
In the dma.h there is a dma_ctx structure using a magic code
to be identify. This structure must be prepared as a new
element of the dma_stm32_data.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
diff --git a/drivers/dma/dma_stm32.c b/drivers/dma/dma_stm32.c
index e7dd25f..f19ccdd 100644
--- a/drivers/dma/dma_stm32.c
+++ b/drivers/dma/dma_stm32.c
@@ -610,6 +610,10 @@
#endif /* CONFIG_DMAMUX_STM32 */
}
+ ((struct dma_stm32_data *)dev->data)->dma_ctx.magic = 0;
+ ((struct dma_stm32_data *)dev->data)->dma_ctx.dma_channels = 0;
+ ((struct dma_stm32_data *)dev->data)->dma_ctx.atomic = 0;
+
return 0;
}
diff --git a/drivers/dma/dma_stm32.h b/drivers/dma/dma_stm32.h
index ce2a92e..a521617 100644
--- a/drivers/dma/dma_stm32.h
+++ b/drivers/dma/dma_stm32.h
@@ -30,6 +30,7 @@
};
struct dma_stm32_data {
+ struct dma_context dma_ctx;
};
struct dma_stm32_config {