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>
This commit is contained in:
@@ -760,8 +760,6 @@ static int tegra_spi_setup(struct spi_device *spi)
|
||||
spi->mode & SPI_CPHA ? "" : "~",
|
||||
spi->max_speed_hz);
|
||||
|
||||
BUG_ON(spi->chip_select >= MAX_CHIP_SELECT);
|
||||
|
||||
ret = pm_runtime_get_sync(tspi->dev);
|
||||
if (ret < 0) {
|
||||
dev_err(tspi->dev, "pm runtime failed, e = %d\n", ret);
|
||||
|
Reference in New Issue
Block a user