|
@@ -1661,7 +1661,8 @@ int spi_write_then_read(struct spi_device *spi,
|
|
|
* using the pre-allocated buffer or the transfer is too large.
|
|
|
*/
|
|
|
if ((n_tx + n_rx) > SPI_BUFSIZ || !mutex_trylock(&lock)) {
|
|
|
- local_buf = kmalloc(max((unsigned)SPI_BUFSIZ, n_tx + n_rx), GFP_KERNEL);
|
|
|
+ local_buf = kmalloc(max((unsigned)SPI_BUFSIZ, n_tx + n_rx),
|
|
|
+ GFP_KERNEL | GFP_DMA);
|
|
|
if (!local_buf)
|
|
|
return -ENOMEM;
|
|
|
} else {
|