diff options
| author | Stephen Warren <[email protected]> | 2013-05-22 02:36:35 +0000 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2013-05-29 19:48:17 +0000 |
| commit | 24778be20f87d5aadb19624fc768b3159fa43efc (patch) | |
| tree | 05124574b6d331f34938bbae09d4014fde7dca76 /drivers/spi/spi-atmel.c | |
| parent | spi: introduce macros to set bits_per_word_mask (diff) | |
| download | kernel-24778be20f87d5aadb19624fc768b3159fa43efc.tar.gz kernel-24778be20f87d5aadb19624fc768b3159fa43efc.zip | |
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 <[email protected]>
Acked-by: H Hartley Sweeten <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'drivers/spi/spi-atmel.c')
| -rw-r--r-- | drivers/spi/spi-atmel.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index 380387a47b1d..31cfc8711547 100644 --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c @@ -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; |
