]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
spi: txx9: Let spi core handle validating transfer length
authorAxel Lin <axel.lin@ingics.com>
Tue, 25 Feb 2014 11:19:43 +0000 (19:19 +0800)
committerMark Brown <broonie@linaro.org>
Sat, 1 Mar 2014 04:50:56 +0000 (13:50 +0900)
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>
Reviewed-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi-txx9.c

index 5cfaafc368fcae9c28f73756c5f99313a6f99d7d..820b499816f8ebfb6bc45a56026dbe05b9b4311f 100644 (file)
@@ -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);