diff options
Diffstat (limited to 'drivers/spi/spi_bfin5xx.c')
-rw-r--r-- | drivers/spi/spi_bfin5xx.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index f706dba165cf..cc880c95e7de 100644 --- a/drivers/spi/spi_bfin5xx.c +++ b/drivers/spi/spi_bfin5xx.c | |||
@@ -681,13 +681,14 @@ static void bfin_spi_pump_transfers(unsigned long data) | |||
681 | drv_data->cs_change = transfer->cs_change; | 681 | drv_data->cs_change = transfer->cs_change; |
682 | 682 | ||
683 | /* Bits per word setup */ | 683 | /* Bits per word setup */ |
684 | bits_per_word = transfer->bits_per_word ? : message->spi->bits_per_word; | 684 | bits_per_word = transfer->bits_per_word ? : |
685 | if ((bits_per_word > 0) && (bits_per_word % 16 == 0)) { | 685 | message->spi->bits_per_word ? : 8; |
686 | if (bits_per_word % 16 == 0) { | ||
686 | drv_data->n_bytes = bits_per_word/8; | 687 | drv_data->n_bytes = bits_per_word/8; |
687 | drv_data->len = (transfer->len) >> 1; | 688 | drv_data->len = (transfer->len) >> 1; |
688 | cr_width = BIT_CTL_WORDSIZE; | 689 | cr_width = BIT_CTL_WORDSIZE; |
689 | drv_data->ops = &bfin_bfin_spi_transfer_ops_u16; | 690 | drv_data->ops = &bfin_bfin_spi_transfer_ops_u16; |
690 | } else if ((bits_per_word > 0) && (bits_per_word % 8 == 0)) { | 691 | } else if (bits_per_word % 8 == 0) { |
691 | drv_data->n_bytes = bits_per_word/8; | 692 | drv_data->n_bytes = bits_per_word/8; |
692 | drv_data->len = transfer->len; | 693 | drv_data->len = transfer->len; |
693 | cr_width = 0; | 694 | cr_width = 0; |