diff mbox

spi: atmel: Let spi core handle validating transfer length

Message ID 1393329439.6723.6.camel@phoenix (mailing list archive)
State Accepted
Commit ad6f33d22c25e7340107a330e6de60bba57ecf52
Headers show

Commit Message

Axel Lin Feb. 25, 2014, 11:57 a.m. UTC
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>
---
 drivers/spi/spi-atmel.c | 8 --------
 1 file changed, 8 deletions(-)

Comments

Mark Brown March 3, 2014, 4:01 a.m. UTC | #1
On Tue, Feb 25, 2014 at 07:57:19PM +0800, Axel Lin wrote:
> 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.

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
index c3ed7ed..878fe93 100644
--- a/drivers/spi/spi-atmel.c
+++ b/drivers/spi/spi-atmel.c
@@ -1079,14 +1079,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.