mirror of
https://github.com/joel16/android_kernel_sony_msm8994_rework.git
synced 2024-11-27 22:00:42 +00:00
[PATCH] SPI: spi bounce buffer has a minimum length
Make sure that spi_write_then_read() can always handle at least 32 bytes of transfer (total, both directions), minimizing one portability issue. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
747d844ee9
commit
a9948b6194
@ -522,7 +522,8 @@ int spi_sync(struct spi_device *spi, struct spi_message *message)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(spi_sync);
|
||||
|
||||
#define SPI_BUFSIZ (SMP_CACHE_BYTES)
|
||||
/* portable code must never pass more than 32 bytes */
|
||||
#define SPI_BUFSIZ max(32,SMP_CACHE_BYTES)
|
||||
|
||||
static u8 *buf;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user