aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2013-04-01 09:17:37 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-04-01 09:17:37 -0400
commite761f4236e94f2dd36316f9892583b29ce986031 (patch)
treeb5dbda1e8286034df9bc05471fd96d65a7f82ef4 /drivers
parentf4b97eb5061256045e0f031b6a4bcf8c722b35ff (diff)
spi/s3c64xx: Convert to bits_per_word_mask
The core can do the validation for us. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/spi/spi-s3c64xx.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 7f5f8ee68840..27ff669f0937 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -911,15 +911,6 @@ static int s3c64xx_spi_setup(struct spi_device *spi)
911 911
912 spin_unlock_irqrestore(&sdd->lock, flags); 912 spin_unlock_irqrestore(&sdd->lock, flags);
913 913
914 if (spi->bits_per_word != 8
915 && spi->bits_per_word != 16
916 && spi->bits_per_word != 32) {
917 dev_err(&spi->dev, "setup: %dbits/wrd not supported!\n",
918 spi->bits_per_word);
919 err = -EINVAL;
920 goto setup_exit;
921 }
922
923 pm_runtime_get_sync(&sdd->pdev->dev); 914 pm_runtime_get_sync(&sdd->pdev->dev);
924 915
925 /* Check if we can provide the requested rate */ 916 /* Check if we can provide the requested rate */
@@ -1237,6 +1228,7 @@ static int s3c64xx_spi_probe(struct platform_device *pdev)
1237 master->unprepare_transfer_hardware = s3c64xx_spi_unprepare_transfer; 1228 master->unprepare_transfer_hardware = s3c64xx_spi_unprepare_transfer;
1238 master->num_chipselect = sci->num_cs; 1229 master->num_chipselect = sci->num_cs;
1239 master->dma_alignment = 8; 1230 master->dma_alignment = 8;
1231 master->bits_per_word_mask = BIT(32 - 1) | BIT(16 - 1) | BIT(8 - 1);
1240 /* the spi->mode bits understood by this driver: */ 1232 /* the spi->mode bits understood by this driver: */
1241 master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH; 1233 master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
1242 1234