diff options
| author | Axel Lin <axel.lin@ingics.com> | 2014-02-25 06:19:43 -0500 |
|---|---|---|
| committer | Mark Brown <broonie@linaro.org> | 2014-02-28 23:50:56 -0500 |
| commit | f8c717a567158cdd703b39118eec20cfffdcf585 (patch) | |
| tree | 6198cd0c1e636f27a86ebe5dc39a317de556cfc7 | |
| parent | 7bdadd8d94a203c0bf02c0f128148e8be3e7f66a (diff) | |
spi: txx9: 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.
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>
| -rw-r--r-- | drivers/spi/spi-txx9.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/spi/spi-txx9.c b/drivers/spi/spi-txx9.c index 5cfaafc368fc..820b499816f8 100644 --- a/drivers/spi/spi-txx9.c +++ b/drivers/spi/spi-txx9.c | |||
| @@ -306,12 +306,8 @@ static int txx9spi_transfer(struct spi_device *spi, struct spi_message *m) | |||
| 306 | 306 | ||
| 307 | /* check each transfer's parameters */ | 307 | /* check each transfer's parameters */ |
| 308 | list_for_each_entry(t, &m->transfers, transfer_list) { | 308 | list_for_each_entry(t, &m->transfers, transfer_list) { |
| 309 | u8 bits_per_word = t->bits_per_word; | ||
| 310 | |||
| 311 | if (!t->tx_buf && !t->rx_buf && t->len) | 309 | if (!t->tx_buf && !t->rx_buf && t->len) |
| 312 | return -EINVAL; | 310 | return -EINVAL; |
| 313 | if (t->len & ((bits_per_word >> 3) - 1)) | ||
| 314 | return -EINVAL; | ||
| 315 | } | 311 | } |
| 316 | 312 | ||
| 317 | spin_lock_irqsave(&c->lock, flags); | 313 | spin_lock_irqsave(&c->lock, flags); |
