diff options
Diffstat (limited to 'drivers/spi/spi-txx9.c')
-rw-r--r-- | drivers/spi/spi-txx9.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/spi/spi-txx9.c b/drivers/spi/spi-txx9.c index d5a3cbb646cb..550b5f48fd8f 100644 --- a/drivers/spi/spi-txx9.c +++ b/drivers/spi/spi-txx9.c | |||
@@ -189,9 +189,8 @@ static void txx9spi_work_one(struct txx9spi *c, struct spi_message *m) | |||
189 | unsigned int len = t->len; | 189 | unsigned int len = t->len; |
190 | unsigned int wsize; | 190 | unsigned int wsize; |
191 | u32 speed_hz = t->speed_hz ? : spi->max_speed_hz; | 191 | u32 speed_hz = t->speed_hz ? : spi->max_speed_hz; |
192 | u8 bits_per_word = t->bits_per_word ? : spi->bits_per_word; | 192 | u8 bits_per_word = t->bits_per_word; |
193 | 193 | ||
194 | bits_per_word = bits_per_word ? : 8; | ||
195 | wsize = bits_per_word >> 3; /* in bytes */ | 194 | wsize = bits_per_word >> 3; /* in bytes */ |
196 | 195 | ||
197 | if (prev_speed_hz != speed_hz | 196 | if (prev_speed_hz != speed_hz |
@@ -316,9 +315,8 @@ static int txx9spi_transfer(struct spi_device *spi, struct spi_message *m) | |||
316 | /* check each transfer's parameters */ | 315 | /* check each transfer's parameters */ |
317 | list_for_each_entry (t, &m->transfers, transfer_list) { | 316 | list_for_each_entry (t, &m->transfers, transfer_list) { |
318 | u32 speed_hz = t->speed_hz ? : spi->max_speed_hz; | 317 | u32 speed_hz = t->speed_hz ? : spi->max_speed_hz; |
319 | u8 bits_per_word = t->bits_per_word ? : spi->bits_per_word; | 318 | u8 bits_per_word = t->bits_per_word; |
320 | 319 | ||
321 | bits_per_word = bits_per_word ? : 8; | ||
322 | if (!t->tx_buf && !t->rx_buf && t->len) | 320 | if (!t->tx_buf && !t->rx_buf && t->len) |
323 | return -EINVAL; | 321 | return -EINVAL; |
324 | if (bits_per_word != 8 && bits_per_word != 16) | 322 | if (bits_per_word != 8 && bits_per_word != 16) |