OSDN Git Service

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 88bebf8..4804586 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.