diff options
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi_bfin5xx.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index 18b313a57236..a91e556489a9 100644 --- a/drivers/spi/spi_bfin5xx.c +++ b/drivers/spi/spi_bfin5xx.c | |||
@@ -1022,6 +1022,10 @@ static int bfin_spi_setup(struct spi_device *spi) | |||
1022 | } | 1022 | } |
1023 | 1023 | ||
1024 | /* translate common spi framework into our register */ | 1024 | /* translate common spi framework into our register */ |
1025 | if (spi->mode & ~(SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST)) { | ||
1026 | dev_err(&spi->dev, "unsupported spi modes detected\n"); | ||
1027 | goto error; | ||
1028 | } | ||
1025 | if (spi->mode & SPI_CPOL) | 1029 | if (spi->mode & SPI_CPOL) |
1026 | chip->ctl_reg |= BIT_CTL_CPOL; | 1030 | chip->ctl_reg |= BIT_CTL_CPOL; |
1027 | if (spi->mode & SPI_CPHA) | 1031 | if (spi->mode & SPI_CPHA) |