These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / net / wireless / ti / wlcore / spi.c
index f1ac283..44f059f 100644 (file)
  */
 #define SPI_AGGR_BUFFER_SIZE (4 * PAGE_SIZE)
 
-#define WSPI_MAX_NUM_OF_CHUNKS (SPI_AGGR_BUFFER_SIZE / WSPI_MAX_CHUNK_SIZE)
+/* Maximum number of SPI write chunks */
+#define WSPI_MAX_NUM_OF_CHUNKS \
+       ((SPI_AGGR_BUFFER_SIZE / WSPI_MAX_CHUNK_SIZE) + 1)
+
 
 struct wl12xx_spi_glue {
        struct device *dev;
@@ -268,9 +271,10 @@ static int __must_check wl12xx_spi_raw_write(struct device *child, int addr,
                                             void *buf, size_t len, bool fixed)
 {
        struct wl12xx_spi_glue *glue = dev_get_drvdata(child->parent);
-       struct spi_transfer t[2 * (WSPI_MAX_NUM_OF_CHUNKS + 1)];
+       /* SPI write buffers - 2 for each chunk */
+       struct spi_transfer t[2 * WSPI_MAX_NUM_OF_CHUNKS];
        struct spi_message m;
-       u32 commands[WSPI_MAX_NUM_OF_CHUNKS];
+       u32 commands[WSPI_MAX_NUM_OF_CHUNKS]; /* 1 command per chunk */
        u32 *cmd;
        u32 chunk_len;
        int i;
@@ -408,7 +412,6 @@ static int wl1271_remove(struct spi_device *spi)
 static struct spi_driver wl1271_spi_driver = {
        .driver = {
                .name           = "wl1271_spi",
-               .owner          = THIS_MODULE,
        },
 
        .probe          = wl1271_probe,