diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2012-12-18 09:55:43 +0100 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2013-02-05 13:26:59 +0100 |
commit | 766ed70447e0a9cfb23d068a4a929e18e54b0022 (patch) | |
tree | 95e426348573fd136fa4c7aeeeffb84143661e7a /drivers/spi/spi-bfin-sport.c | |
parent | spi/of: Use DT aliases for assigning bus number (diff) | |
download | linux-766ed70447e0a9cfb23d068a4a929e18e54b0022.tar.xz linux-766ed70447e0a9cfb23d068a4a929e18e54b0022.zip |
spi: remove check for bits_per_word on transfer from low level driver
The spi core make sure that each transfer structure have the proper
setting for bits_per_word before calling low level transfer APIs.
Hence it is no more require to check again in low level driver for
this field whether this is set correct or not. Removing such code
from low level driver.
The txx9 change also removes a test for bits_per_word set to 0, and
forcing it to 8 in that case. This can also be removed now since
spi_setup() ensures spi->bits_per_word is not zero.
if (!spi->bits_per_word)
spi->bits_per_word = 8;
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/spi/spi-bfin-sport.c')
-rw-r--r-- | drivers/spi/spi-bfin-sport.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/spi/spi-bfin-sport.c b/drivers/spi/spi-bfin-sport.c index ac7ffca7ba47..39b0d1711b4e 100644 --- a/drivers/spi/spi-bfin-sport.c +++ b/drivers/spi/spi-bfin-sport.c @@ -416,8 +416,7 @@ bfin_sport_spi_pump_transfers(unsigned long data) drv_data->cs_change = transfer->cs_change; /* Bits per word setup */ - bits_per_word = transfer->bits_per_word ? : - message->spi->bits_per_word ? : 8; + bits_per_word = transfer->bits_per_word; if (bits_per_word % 16 == 0) drv_data->ops = &bfin_sport_transfer_ops_u16; else |