diff options
Diffstat (limited to 'drivers/spi/spi-gpio.c')
-rw-r--r-- | drivers/spi/spi-gpio.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/spi/spi-gpio.c b/drivers/spi/spi-gpio.c index 0021fc4c45bc..a7801a889ff9 100644 --- a/drivers/spi/spi-gpio.c +++ b/drivers/spi/spi-gpio.c | |||
@@ -239,9 +239,6 @@ static int spi_gpio_setup(struct spi_device *spi) | |||
239 | struct spi_gpio *spi_gpio = spi_to_spi_gpio(spi); | 239 | struct spi_gpio *spi_gpio = spi_to_spi_gpio(spi); |
240 | struct device_node *np = spi->master->dev.of_node; | 240 | struct device_node *np = spi->master->dev.of_node; |
241 | 241 | ||
242 | if (spi->bits_per_word > 32) | ||
243 | return -EINVAL; | ||
244 | |||
245 | if (np) { | 242 | if (np) { |
246 | /* | 243 | /* |
247 | * In DT environments, the CS GPIOs have already been | 244 | * In DT environments, the CS GPIOs have already been |
@@ -446,6 +443,7 @@ static int spi_gpio_probe(struct platform_device *pdev) | |||
446 | if (pdata) | 443 | if (pdata) |
447 | spi_gpio->pdata = *pdata; | 444 | spi_gpio->pdata = *pdata; |
448 | 445 | ||
446 | master->bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 32); | ||
449 | master->flags = master_flags; | 447 | master->flags = master_flags; |
450 | master->bus_num = pdev->id; | 448 | master->bus_num = pdev->id; |
451 | master->num_chipselect = SPI_N_CHIPSEL; | 449 | master->num_chipselect = SPI_N_CHIPSEL; |