Skip to content

Commit

Permalink
spi: atmel: Let spi core handle validating transfer length
Browse files Browse the repository at this point in the history
spi core will handle validating transfer length since commit 4d94bd2
"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>
  • Loading branch information
Axel Lin authored and Mark Brown committed Mar 3, 2014
1 parent 0e6d873 commit ad6f33d
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions drivers/spi/spi-atmel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit ad6f33d

Please sign in to comment.