mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
parent
cb3c8e5ade
commit
2bca34455b
2 changed files with 5 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue