spi: Add can_dma like interface for spi_flash_read
Add an interface analogous to ->can_dma() for spi_flash_read() interface. This will enable SPI controller drivers to inform SPI core when not to do DMA mappings. Signed-off-by: Vignesh R <vigneshr@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
@@ -2811,7 +2811,7 @@ int spi_flash_read(struct spi_device *spi,
|
||||
|
||||
mutex_lock(&master->bus_lock_mutex);
|
||||
mutex_lock(&master->io_mutex);
|
||||
if (master->dma_rx) {
|
||||
if (master->dma_rx && master->spi_flash_can_dma(spi, msg)) {
|
||||
rx_dev = master->dma_rx->device->dev;
|
||||
ret = spi_map_buf(master, rx_dev, &msg->rx_sg,
|
||||
msg->buf, msg->len,
|
||||
|
Reference in New Issue
Block a user