diff options
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/amba-pl022.c | 1 | ||||
-rw-r--r-- | drivers/spi/omap2_mcspi.c | 2 | ||||
-rw-r--r-- | drivers/spi/spi_bfin5xx.c | 7 |
3 files changed, 6 insertions, 4 deletions
diff --git a/drivers/spi/amba-pl022.c b/drivers/spi/amba-pl022.c index 6a9e58dd36c7..d18ce9e946d8 100644 --- a/drivers/spi/amba-pl022.c +++ b/drivers/spi/amba-pl022.c | |||
@@ -1861,6 +1861,7 @@ static int pl022_setup(struct spi_device *spi) | |||
1861 | } | 1861 | } |
1862 | if ((clk_freq.cpsdvsr < CPSDVR_MIN) | 1862 | if ((clk_freq.cpsdvsr < CPSDVR_MIN) |
1863 | || (clk_freq.cpsdvsr > CPSDVR_MAX)) { | 1863 | || (clk_freq.cpsdvsr > CPSDVR_MAX)) { |
1864 | status = -EINVAL; | ||
1864 | dev_err(&spi->dev, | 1865 | dev_err(&spi->dev, |
1865 | "cpsdvsr is configured incorrectly\n"); | 1866 | "cpsdvsr is configured incorrectly\n"); |
1866 | goto err_config_params; | 1867 | goto err_config_params; |
diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c index 6f86ba0175ac..969cdd2fe124 100644 --- a/drivers/spi/omap2_mcspi.c +++ b/drivers/spi/omap2_mcspi.c | |||
@@ -298,7 +298,7 @@ omap2_mcspi_txrx_dma(struct spi_device *spi, struct spi_transfer *xfer) | |||
298 | unsigned int count, c; | 298 | unsigned int count, c; |
299 | unsigned long base, tx_reg, rx_reg; | 299 | unsigned long base, tx_reg, rx_reg; |
300 | int word_len, data_type, element_count; | 300 | int word_len, data_type, element_count; |
301 | int elements; | 301 | int elements = 0; |
302 | u32 l; | 302 | u32 l; |
303 | u8 * rx; | 303 | u8 * rx; |
304 | const u8 * tx; | 304 | const u8 * tx; |
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; |