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:
@@ -332,12 +332,6 @@ static int uwire_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
|
||||
|
||||
uwire = spi_master_get_devdata(spi->master);
|
||||
|
||||
if (spi->chip_select > 3) {
|
||||
pr_debug("%s: cs%d?\n", dev_name(&spi->dev), spi->chip_select);
|
||||
status = -ENODEV;
|
||||
goto done;
|
||||
}
|
||||
|
||||
bits = spi->bits_per_word;
|
||||
if (t != NULL && t->bits_per_word)
|
||||
bits = t->bits_per_word;
|
||||
|
Reference in New Issue
Block a user