diff options
author | Stephen Warren <swarren@wwwdotorg.org> | 2013-05-21 22:36:35 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-05-29 15:48:17 -0400 |
commit | 24778be20f87d5aadb19624fc768b3159fa43efc (patch) | |
tree | 05124574b6d331f34938bbae09d4014fde7dca76 /drivers/spi/spi-clps711x.c | |
parent | 2922a8de996956893bb98e4aa91be9774c958336 (diff) |
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>
Diffstat (limited to 'drivers/spi/spi-clps711x.c')
-rw-r--r-- | drivers/spi/spi-clps711x.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/spi/spi-clps711x.c b/drivers/spi/spi-clps711x.c index a11cbf02691a..e322b5bf9910 100644 --- a/drivers/spi/spi-clps711x.c +++ b/drivers/spi/spi-clps711x.c | |||
@@ -42,12 +42,6 @@ static int spi_clps711x_setup(struct spi_device *spi) | |||
42 | { | 42 | { |
43 | struct spi_clps711x_data *hw = spi_master_get_devdata(spi->master); | 43 | struct spi_clps711x_data *hw = spi_master_get_devdata(spi->master); |
44 | 44 | ||
45 | if (spi->bits_per_word != 8) { | ||
46 | dev_err(&spi->dev, "Unsupported master bus width %i\n", | ||
47 | spi->bits_per_word); | ||
48 | return -EINVAL; | ||
49 | } | ||
50 | |||
51 | /* We are expect that SPI-device is not selected */ | 45 | /* We are expect that SPI-device is not selected */ |
52 | gpio_direction_output(hw->chipselect[spi->chip_select], | 46 | gpio_direction_output(hw->chipselect[spi->chip_select], |
53 | !(spi->mode & SPI_CS_HIGH)); | 47 | !(spi->mode & SPI_CS_HIGH)); |
@@ -190,6 +184,7 @@ static int spi_clps711x_probe(struct platform_device *pdev) | |||
190 | 184 | ||
191 | master->bus_num = pdev->id; | 185 | master->bus_num = pdev->id; |
192 | master->mode_bits = SPI_CPHA | SPI_CS_HIGH; | 186 | master->mode_bits = SPI_CPHA | SPI_CS_HIGH; |
187 | master->bits_per_word_mask = SPI_BPW_MASK(8); | ||
193 | master->num_chipselect = pdata->num_chipselect; | 188 | master->num_chipselect = pdata->num_chipselect; |
194 | master->setup = spi_clps711x_setup; | 189 | master->setup = spi_clps711x_setup; |
195 | master->transfer_one_message = spi_clps711x_transfer_one_message; | 190 | master->transfer_one_message = spi_clps711x_transfer_one_message; |