drivers: dma: atmel_sam0: Convert to use devicetree macros for dma dev

Convert to using DT_INST_LABEL() in the dma driver and convert dma users
to use the DMA property macros to get the dma controller name.  We make
the assumption in the drivers that there is a single DMA controller
instance.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2020-05-05 05:24:57 -05:00 committed by Kumar Gala
commit a58777e251
5 changed files with 15 additions and 4 deletions

View file

@ -458,6 +458,6 @@ static const struct dma_driver_api dma_sam0_api = {
.get_status = dma_sam0_get_status,
};
DEVICE_AND_API_INIT(dma_sam0_0, CONFIG_DMA_0_NAME, &dma_sam0_init,
DEVICE_AND_API_INIT(dma_sam0_0, DT_INST_LABEL(0), &dma_sam0_init,
&dmac_data, NULL, POST_KERNEL,
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, &dma_sam0_api);