File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -929,9 +929,8 @@ static int i2s_sam_initialize(const struct device *dev)
929929 k_sem_init (& dev_data -> tx .sem , CONFIG_I2S_SAM_SSC_TX_BLOCK_COUNT ,
930930 CONFIG_I2S_SAM_SSC_TX_BLOCK_COUNT );
931931
932- dev_data -> dev_dma = device_get_binding (DT_INST_DMAS_LABEL_BY_NAME (0 , tx ));
933- if (!dev_data -> dev_dma ) {
934- LOG_ERR ("%s device not found" , DT_INST_DMAS_LABEL_BY_NAME (0 , tx ));
932+ if (!device_is_ready (dev_data -> dev_dma )) {
933+ LOG_ERR ("%s device not ready" , dev_data -> dev_dma -> name );
935934 return - ENODEV ;
936935 }
937936
@@ -988,6 +987,7 @@ struct queue_item rx_0_ring_buf[CONFIG_I2S_SAM_SSC_RX_BLOCK_COUNT + 1];
988987struct queue_item tx_0_ring_buf [CONFIG_I2S_SAM_SSC_TX_BLOCK_COUNT + 1 ];
989988
990989static struct i2s_sam_dev_data i2s0_sam_data = {
990+ .dev_dma = DEVICE_DT_GET (DT_INST_DMAS_CTLR_BY_NAME (0 , tx )),
991991 .rx = {
992992 .dma_channel = DT_INST_DMAS_CELL_BY_NAME (0 , rx , channel ),
993993 .dma_cfg = {
You can’t perform that action at this time.
0 commit comments