Skip to contentSkip to conversation

spi: atmel: Let spi core handle validating transfer length

PATCH Applied Axel Lin 2 participants 2 messages Feb 25, 2014 – Mar 3, 2014

Subsystems (3)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 spi: atmel: Let spi core handle validating transfer length

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.

---
 drivers/spi/spi-atmel.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/spi/spi-atmel.c +0 -8
index c3ed7ed..878fe93 100644
@@ -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.
Signature · 8 lines
1.8.1.2



--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Applied
#1 lore raw
Quoted 3 lines · Axel Lin

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.