diff options
Diffstat (limited to 'drivers/spi/spi-au1550.c')
-rw-r--r-- | drivers/spi/spi-au1550.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/spi/spi-au1550.c b/drivers/spi/spi-au1550.c index 44dd34b6ad09..d736fa942020 100644 --- a/drivers/spi/spi-au1550.c +++ b/drivers/spi/spi-au1550.c | |||
@@ -248,11 +248,6 @@ static int au1550_spi_setupxfer(struct spi_device *spi, struct spi_transfer *t) | |||
248 | hz = t->speed_hz; | 248 | hz = t->speed_hz; |
249 | } | 249 | } |
250 | 250 | ||
251 | if (bpw < 4 || bpw > 24) { | ||
252 | dev_err(&spi->dev, "setupxfer: invalid bits_per_word=%d\n", | ||
253 | bpw); | ||
254 | return -EINVAL; | ||
255 | } | ||
256 | if (hz > spi->max_speed_hz || hz > hw->freq_max || hz < hw->freq_min) { | 251 | if (hz > spi->max_speed_hz || hz > hw->freq_max || hz < hw->freq_min) { |
257 | dev_err(&spi->dev, "setupxfer: clock rate=%d out of range\n", | 252 | dev_err(&spi->dev, "setupxfer: clock rate=%d out of range\n", |
258 | hz); | 253 | hz); |
@@ -296,12 +291,6 @@ static int au1550_spi_setup(struct spi_device *spi) | |||
296 | { | 291 | { |
297 | struct au1550_spi *hw = spi_master_get_devdata(spi->master); | 292 | struct au1550_spi *hw = spi_master_get_devdata(spi->master); |
298 | 293 | ||
299 | if (spi->bits_per_word < 4 || spi->bits_per_word > 24) { | ||
300 | dev_err(&spi->dev, "setup: invalid bits_per_word=%d\n", | ||
301 | spi->bits_per_word); | ||
302 | return -EINVAL; | ||
303 | } | ||
304 | |||
305 | if (spi->max_speed_hz == 0) | 294 | if (spi->max_speed_hz == 0) |
306 | spi->max_speed_hz = hw->freq_max; | 295 | spi->max_speed_hz = hw->freq_max; |
307 | if (spi->max_speed_hz > hw->freq_max | 296 | if (spi->max_speed_hz > hw->freq_max |
@@ -782,6 +771,7 @@ static int au1550_spi_probe(struct platform_device *pdev) | |||
782 | 771 | ||
783 | /* the spi->mode bits understood by this driver: */ | 772 | /* the spi->mode bits understood by this driver: */ |
784 | master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_LSB_FIRST; | 773 | master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_LSB_FIRST; |
774 | master->bits_per_word_mask = SPI_BPW_RANGE_MASK(4, 24); | ||
785 | 775 | ||
786 | hw = spi_master_get_devdata(master); | 776 | hw = spi_master_get_devdata(master); |
787 | 777 | ||