Merge remote-tracking branch 'remotes/tegra/android-tegra-2.6.36-honeycomb-mr1' into...
[firefly-linux-kernel-4.4.55.git] / drivers / spi / spi.c
old mode 100644 (file)
new mode 100755 (executable)
index b5a78a1..90b6a3f
@@ -942,7 +942,7 @@ int spi_bus_unlock(struct spi_master *master)
 EXPORT_SYMBOL_GPL(spi_bus_unlock);
 
 /* portable code must never pass more than 32 bytes */
-#define        SPI_BUFSIZ      max(32,SMP_CACHE_BYTES)
+#define        SPI_BUFSIZ      max(1028,SMP_CACHE_BYTES)
 
 static u8      *buf;
 
@@ -1002,6 +1002,7 @@ int spi_write_then_read(struct spi_device *spi,
        } else
                local_buf = buf;
 
+       memset(local_buf, 0, SPI_BUFSIZ);
        memcpy(local_buf, txbuf, n_tx);
        x[0].tx_buf = local_buf;
        x[1].rx_buf = local_buf + n_tx;