aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi.c
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2006-04-02 14:37:40 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-05-16 17:33:57 -0400
commita9948b6194b46e489aa3b4d111d6dfd786c39c4b (patch)
tree28f4984be0547c773ad24ef6ed882f1ae9cbede8 /drivers/spi/spi.c
parent747d844ee9a183ff3067bb1181f2a25c50649538 (diff)
[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>
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r--drivers/spi/spi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 94f5e8ed83a..1168ef01588 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -522,7 +522,8 @@ int spi_sync(struct spi_device *spi, struct spi_message *message)
522} 522}
523EXPORT_SYMBOL_GPL(spi_sync); 523EXPORT_SYMBOL_GPL(spi_sync);
524 524
525#define SPI_BUFSIZ (SMP_CACHE_BYTES) 525/* portable code must never pass more than 32 bytes */
526#define SPI_BUFSIZ max(32,SMP_CACHE_BYTES)
526 527
527static u8 *buf; 528static u8 *buf;
528 529