summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-coldfire-qspi.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2014-02-11 22:07:30 +0800
committerMark Brown <broonie@linaro.org>2014-02-12 16:25:32 +0000
commit354312f16e49add1da78f0cfb2bcb633709d0071 (patch)
tree52191dc553cd118cfff145f61caf65a4107017f8 /drivers/spi/spi-coldfire-qspi.c
parent3c604de496d7568b3fddb9f2531630aa89908186 (diff)
spi: Remove duplicate code to check chip_select
In spi_add_device(), we have the code to validate spi->chip_select. So remove the duplicate code in various drivers. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-coldfire-qspi.c')
-rw-r--r--drivers/spi/spi-coldfire-qspi.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/spi/spi-coldfire-qspi.c b/drivers/spi/spi-coldfire-qspi.c
index cabed8f9119e..0ab2c55575dd 100644
--- a/drivers/spi/spi-coldfire-qspi.c
+++ b/drivers/spi/spi-coldfire-qspi.c
@@ -356,12 +356,6 @@ static int mcfqspi_transfer_one_message(struct spi_master *master,
static int mcfqspi_setup(struct spi_device *spi)
{
- if (spi->chip_select >= spi->master->num_chipselect) {
- dev_dbg(&spi->dev, "%d chip select is out of range\n",
- spi->chip_select);
- return -EINVAL;
- }
-
mcfqspi_cs_deselect(spi_master_get_devdata(spi->master),
spi->chip_select, spi->mode & SPI_CS_HIGH);