Skip to content

Commit

Permalink
spi: txx9: 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>
Reviewed-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Axel Lin authored and Mark Brown committed Mar 1, 2014
1 parent 7bdadd8 commit f8c717a
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions drivers/spi/spi-txx9.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,12 +306,8 @@ static int txx9spi_transfer(struct spi_device *spi, struct spi_message *m)

/* check each transfer's parameters */
list_for_each_entry(t, &m->transfers, transfer_list) {
u8 bits_per_word = t->bits_per_word;

if (!t->tx_buf && !t->rx_buf && t->len)
return -EINVAL;
if (t->len & ((bits_per_word >> 3) - 1))
return -EINVAL;
}

spin_lock_irqsave(&c->lock, flags);
Expand Down

0 comments on commit f8c717a

Please sign in to comment.