diff options
-rw-r--r-- | drivers/spi/spi-atmel.c | 7 | ||||
-rw-r--r-- | drivers/spi/spi-coldfire-qspi.c | 6 | ||||
-rw-r--r-- | drivers/spi/spi-falcon.c | 3 | ||||
-rw-r--r-- | drivers/spi/spi-mpc52xx.c | 3 | ||||
-rw-r--r-- | drivers/spi/spi-omap-uwire.c | 6 | ||||
-rw-r--r-- | drivers/spi/spi-tegra114.c | 2 | ||||
-rw-r--r-- | drivers/spi/spi-tegra20-slink.c | 2 |
7 files changed, 0 insertions, 29 deletions
diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index b0842f751016..5488ab86312f 100644 --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c | |||
@@ -993,13 +993,6 @@ static int atmel_spi_setup(struct spi_device *spi) | |||
993 | 993 | ||
994 | as = spi_master_get_devdata(spi->master); | 994 | as = spi_master_get_devdata(spi->master); |
995 | 995 | ||
996 | if (spi->chip_select > spi->master->num_chipselect) { | ||
997 | dev_dbg(&spi->dev, | ||
998 | "setup: invalid chipselect %u (%u defined)\n", | ||
999 | spi->chip_select, spi->master->num_chipselect); | ||
1000 | return -EINVAL; | ||
1001 | } | ||
1002 | |||
1003 | /* see notes above re chipselect */ | 996 | /* see notes above re chipselect */ |
1004 | if (!atmel_spi_is_v2(as) | 997 | if (!atmel_spi_is_v2(as) |
1005 | && spi->chip_select == 0 | 998 | && spi->chip_select == 0 |
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, | |||
356 | 356 | ||
357 | static int mcfqspi_setup(struct spi_device *spi) | 357 | static int mcfqspi_setup(struct spi_device *spi) |
358 | { | 358 | { |
359 | if (spi->chip_select >= spi->master->num_chipselect) { | ||
360 | dev_dbg(&spi->dev, "%d chip select is out of range\n", | ||
361 | spi->chip_select); | ||
362 | return -EINVAL; | ||
363 | } | ||
364 | |||
365 | mcfqspi_cs_deselect(spi_master_get_devdata(spi->master), | 359 | mcfqspi_cs_deselect(spi_master_get_devdata(spi->master), |
366 | spi->chip_select, spi->mode & SPI_CS_HIGH); | 360 | spi->chip_select, spi->mode & SPI_CS_HIGH); |
367 | 361 | ||
diff --git a/drivers/spi/spi-falcon.c b/drivers/spi/spi-falcon.c index dd5bd468e962..0ae7f45e24a5 100644 --- a/drivers/spi/spi-falcon.c +++ b/drivers/spi/spi-falcon.c | |||
@@ -312,9 +312,6 @@ static int falcon_sflash_setup(struct spi_device *spi) | |||
312 | unsigned int i; | 312 | unsigned int i; |
313 | unsigned long flags; | 313 | unsigned long flags; |
314 | 314 | ||
315 | if (spi->chip_select > 0) | ||
316 | return -ENODEV; | ||
317 | |||
318 | spin_lock_irqsave(&ebu_lock, flags); | 315 | spin_lock_irqsave(&ebu_lock, flags); |
319 | 316 | ||
320 | if (spi->max_speed_hz >= CLOCK_100M) { | 317 | if (spi->max_speed_hz >= CLOCK_100M) { |
diff --git a/drivers/spi/spi-mpc52xx.c b/drivers/spi/spi-mpc52xx.c index 7c675fe83101..e3d29a56d70a 100644 --- a/drivers/spi/spi-mpc52xx.c +++ b/drivers/spi/spi-mpc52xx.c | |||
@@ -365,9 +365,6 @@ static int mpc52xx_spi_setup(struct spi_device *spi) | |||
365 | if (spi->mode & ~(SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST)) | 365 | if (spi->mode & ~(SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST)) |
366 | return -EINVAL; | 366 | return -EINVAL; |
367 | 367 | ||
368 | if (spi->chip_select >= spi->master->num_chipselect) | ||
369 | return -EINVAL; | ||
370 | |||
371 | return 0; | 368 | return 0; |
372 | } | 369 | } |
373 | 370 | ||
diff --git a/drivers/spi/spi-omap-uwire.c b/drivers/spi/spi-omap-uwire.c index 9313fd3b413d..462ddd458217 100644 --- a/drivers/spi/spi-omap-uwire.c +++ b/drivers/spi/spi-omap-uwire.c | |||
@@ -332,12 +332,6 @@ static int uwire_setup_transfer(struct spi_device *spi, struct spi_transfer *t) | |||
332 | 332 | ||
333 | uwire = spi_master_get_devdata(spi->master); | 333 | uwire = spi_master_get_devdata(spi->master); |
334 | 334 | ||
335 | if (spi->chip_select > 3) { | ||
336 | pr_debug("%s: cs%d?\n", dev_name(&spi->dev), spi->chip_select); | ||
337 | status = -ENODEV; | ||
338 | goto done; | ||
339 | } | ||
340 | |||
341 | bits = spi->bits_per_word; | 335 | bits = spi->bits_per_word; |
342 | if (t != NULL && t->bits_per_word) | 336 | if (t != NULL && t->bits_per_word) |
343 | bits = t->bits_per_word; | 337 | bits = t->bits_per_word; |
diff --git a/drivers/spi/spi-tegra114.c b/drivers/spi/spi-tegra114.c index d8c71b81165a..22905b5d2546 100644 --- a/drivers/spi/spi-tegra114.c +++ b/drivers/spi/spi-tegra114.c | |||
@@ -760,8 +760,6 @@ static int tegra_spi_setup(struct spi_device *spi) | |||
760 | spi->mode & SPI_CPHA ? "" : "~", | 760 | spi->mode & SPI_CPHA ? "" : "~", |
761 | spi->max_speed_hz); | 761 | spi->max_speed_hz); |
762 | 762 | ||
763 | BUG_ON(spi->chip_select >= MAX_CHIP_SELECT); | ||
764 | |||
765 | ret = pm_runtime_get_sync(tspi->dev); | 763 | ret = pm_runtime_get_sync(tspi->dev); |
766 | if (ret < 0) { | 764 | if (ret < 0) { |
767 | dev_err(tspi->dev, "pm runtime failed, e = %d\n", ret); | 765 | dev_err(tspi->dev, "pm runtime failed, e = %d\n", ret); |
diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c index 9da14f2e2818..593e823d6c21 100644 --- a/drivers/spi/spi-tegra20-slink.c +++ b/drivers/spi/spi-tegra20-slink.c | |||
@@ -760,8 +760,6 @@ static int tegra_slink_setup(struct spi_device *spi) | |||
760 | spi->mode & SPI_CPHA ? "" : "~", | 760 | spi->mode & SPI_CPHA ? "" : "~", |
761 | spi->max_speed_hz); | 761 | spi->max_speed_hz); |
762 | 762 | ||
763 | BUG_ON(spi->chip_select >= MAX_CHIP_SELECT); | ||
764 | |||
765 | ret = pm_runtime_get_sync(tspi->dev); | 763 | ret = pm_runtime_get_sync(tspi->dev); |
766 | if (ret < 0) { | 764 | if (ret < 0) { |
767 | dev_err(tspi->dev, "pm runtime failed, e = %d\n", ret); | 765 | dev_err(tspi->dev, "pm runtime failed, e = %d\n", ret); |