Skip to content

Commit f8b5b77

Browse files
smalaenashif
authored andcommitted
drivers: spi: siwx91x: Guard callback registration
Guard callback registration with CONFIG_SPI_ASYNC to avoid build error for blocking SPI transfers using DMA Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
1 parent d4b551b commit f8b5b77

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/spi/spi_silabs_siwx91x_gspi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,10 @@ static int gspi_siwx91x_config(const struct device *dev, const struct spi_config
215215
}
216216
}
217217

218+
#ifdef CONFIG_SPI_ASYNC
218219
data->ctx.callback = cb;
219220
data->ctx.callback_data = userdata;
221+
#endif
220222
#endif
221223
data->ctx.config = spi_cfg;
222224

0 commit comments

Comments
 (0)