diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2011-06-17 16:32:26 +0200 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-06-17 16:32:26 +0200 |
commit | f8db4cc4f2b11bdded6c94f0d55906847474b982 (patch) | |
tree | d1b99d186edb9d203fafd896f19487125a2395af /drivers/spi/spi-bfin5xx.c | |
parent | spi/topcliff-pch: Support new device ML7223 IOH (diff) | |
parent | spi/bfin_spi: fix handling of default bits per word setting (diff) | |
download | linux-f8db4cc4f2b11bdded6c94f0d55906847474b982.tar.xz linux-f8db4cc4f2b11bdded6c94f0d55906847474b982.zip |
Merge branch 'spi/merge' into spi/next
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) drv_data->cs_change = transfer->cs_change; /* Bits per word setup */ - bits_per_word = transfer->bits_per_word ? : message->spi->bits_per_word; - if ((bits_per_word > 0) && (bits_per_word % 16 == 0)) { + bits_per_word = transfer->bits_per_word ? : + message->spi->bits_per_word ? : 8; + if (bits_per_word % 16 == 0) { drv_data->n_bytes = bits_per_word/8; drv_data->len = (transfer->len) >> 1; cr_width = BIT_CTL_WORDSIZE; drv_data->ops = &bfin_bfin_spi_transfer_ops_u16; - } else if ((bits_per_word > 0) && (bits_per_word % 8 == 0)) { + } else if (bits_per_word % 8 == 0) { drv_data->n_bytes = bits_per_word/8; drv_data->len = transfer->len; cr_width = 0; |