spi: atmel: Let spi core handle validating transfer length
authorAxel Lin <axel.lin@ingics.com>
Tue, 25 Feb 2014 11:57:19 +0000 (19:57 +0800)
committerMark Brown <broonie@linaro.org>
Mon, 3 Mar 2014 04:01:28 +0000 (12:01 +0800)
spi core will handle validating transfer length since commit 4d94bd21b333
"spi: core: Validate length of the transfers in message".
So remove the same checking in this driver.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi-atmel.c

index 88bebf8cf0e57446d88101963c64387f415b4aae..4804586edd296951fd6407b9306719f1265b7388 100644 (file)
@@ -1087,14 +1087,6 @@ static int atmel_spi_one_transfer(struct spi_master *master,
                }
        }
 
-       if (xfer->bits_per_word > 8) {
-               if (xfer->len % 2) {
-                       dev_dbg(&spi->dev,
-                       "buffer len should be 16 bits aligned\n");
-                       return -EINVAL;
-               }
-       }
-
        /*
         * DMA map early, for performance (empties dcache ASAP) and
         * better fault reporting.