aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-ppc4xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/spi-ppc4xx.c')
-rw-r--r--drivers/spi/spi-ppc4xx.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/spi/spi-ppc4xx.c b/drivers/spi/spi-ppc4xx.c
index 8548e574749d..0ee53c25ba58 100644
--- a/drivers/spi/spi-ppc4xx.c
+++ b/drivers/spi/spi-ppc4xx.c
@@ -190,12 +190,6 @@ static int spi_ppc4xx_setupxfer(struct spi_device *spi, struct spi_transfer *t)
190 speed = min(t->speed_hz, spi->max_speed_hz); 190 speed = min(t->speed_hz, spi->max_speed_hz);
191 } 191 }
192 192
193 if (bits_per_word != 8) {
194 dev_err(&spi->dev, "invalid bits-per-word (%d)\n",
195 bits_per_word);
196 return -EINVAL;
197 }
198
199 if (!speed || (speed > spi->max_speed_hz)) { 193 if (!speed || (speed > spi->max_speed_hz)) {
200 dev_err(&spi->dev, "invalid speed_hz (%d)\n", speed); 194 dev_err(&spi->dev, "invalid speed_hz (%d)\n", speed);
201 return -EINVAL; 195 return -EINVAL;
@@ -229,12 +223,6 @@ static int spi_ppc4xx_setup(struct spi_device *spi)
229{ 223{
230 struct spi_ppc4xx_cs *cs = spi->controller_state; 224 struct spi_ppc4xx_cs *cs = spi->controller_state;
231 225
232 if (spi->bits_per_word != 8) {
233 dev_err(&spi->dev, "invalid bits-per-word (%d)\n",
234 spi->bits_per_word);
235 return -EINVAL;
236 }
237
238 if (!spi->max_speed_hz) { 226 if (!spi->max_speed_hz) {
239 dev_err(&spi->dev, "invalid max_speed_hz (must be non-zero)\n"); 227 dev_err(&spi->dev, "invalid max_speed_hz (must be non-zero)\n");
240 return -EINVAL; 228 return -EINVAL;
@@ -465,6 +453,7 @@ static int spi_ppc4xx_of_probe(struct platform_device *op)
465 bbp->use_dma = 0; 453 bbp->use_dma = 0;
466 bbp->master->setup = spi_ppc4xx_setup; 454 bbp->master->setup = spi_ppc4xx_setup;
467 bbp->master->cleanup = spi_ppc4xx_cleanup; 455 bbp->master->cleanup = spi_ppc4xx_cleanup;
456 bbp->master->bits_per_word_mask = SPI_BPW_MASK(8);
468 457
469 /* the spi->mode bits understood by this driver: */ 458 /* the spi->mode bits understood by this driver: */
470 bbp->master->mode_bits = 459 bbp->master->mode_bits =