mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
spi: convert drivers to use bits_per_word_mask
Fill in the recently added spi_master.bits_per_word_mask field in as many drivers as possible. Make related cleanups, such as removing any redundant error-checking, or empty setup callbacks. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
2922a8de99
commit
24778be20f
28 changed files with 46 additions and 280 deletions
|
@ -1268,13 +1268,6 @@ static int atmel_spi_setup(struct spi_device *spi)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (bits < 8 || bits > 16) {
|
||||
dev_dbg(&spi->dev,
|
||||
"setup: invalid bits_per_word %u (8 to 16)\n",
|
||||
bits);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* see notes above re chipselect */
|
||||
if (!atmel_spi_is_v2(as)
|
||||
&& spi->chip_select == 0
|
||||
|
@ -1515,7 +1508,7 @@ static int atmel_spi_probe(struct platform_device *pdev)
|
|||
|
||||
/* the spi->mode bits understood by this driver: */
|
||||
master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
|
||||
|
||||
master->bits_per_word_mask = SPI_BPW_RANGE_MASK(8, 16);
|
||||
master->dev.of_node = pdev->dev.of_node;
|
||||
master->bus_num = pdev->id;
|
||||
master->num_chipselect = master->dev.of_node ? 0 : 4;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue