aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-sirf.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@wwwdotorg.org>2013-05-21 22:36:35 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-05-29 15:48:17 -0400
commit24778be20f87d5aadb19624fc768b3159fa43efc (patch)
tree05124574b6d331f34938bbae09d4014fde7dca76 /drivers/spi/spi-sirf.c
parent2922a8de996956893bb98e4aa91be9774c958336 (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-sirf.c')
-rw-r--r--drivers/spi/spi-sirf.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/spi/spi-sirf.c b/drivers/spi/spi-sirf.c
index 0808cd56bf8d..77497be042a8 100644
--- a/drivers/spi/spi-sirf.c
+++ b/drivers/spi/spi-sirf.c
@@ -425,10 +425,6 @@ spi_sirfsoc_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
425 rxfifo_ctrl = SIRFSOC_SPI_FIFO_THD(SIRFSOC_SPI_FIFO_SIZE / 2) | 425 rxfifo_ctrl = SIRFSOC_SPI_FIFO_THD(SIRFSOC_SPI_FIFO_SIZE / 2) |
426 SIRFSOC_SPI_FIFO_WIDTH_DWORD; 426 SIRFSOC_SPI_FIFO_WIDTH_DWORD;
427 break; 427 break;
428 default:
429 dev_err(&spi->dev, "Bits per word %d not supported\n",
430 bits_per_word);
431 return -EINVAL;
432 } 428 }
433 429
434 if (!(spi->mode & SPI_CS_HIGH)) 430 if (!(spi->mode & SPI_CS_HIGH))
@@ -556,6 +552,8 @@ static int spi_sirfsoc_probe(struct platform_device *pdev)
556 sspi->bitbang.txrx_bufs = spi_sirfsoc_transfer; 552 sspi->bitbang.txrx_bufs = spi_sirfsoc_transfer;
557 sspi->bitbang.master->setup = spi_sirfsoc_setup; 553 sspi->bitbang.master->setup = spi_sirfsoc_setup;
558 master->bus_num = pdev->id; 554 master->bus_num = pdev->id;
555 master->bits_per_word_mask = SPI_BPW_MASK(8) | SPI_BPW_MASK(12) |
556 SPI_BPW_MASK(16) | SPI_BPW_MASK(32);
559 sspi->bitbang.master->dev.of_node = pdev->dev.of_node; 557 sspi->bitbang.master->dev.of_node = pdev->dev.of_node;
560 558
561 sspi->p = pinctrl_get_select_default(&pdev->dev); 559 sspi->p = pinctrl_get_select_default(&pdev->dev);