Skip to content

Commit

Permalink
spi: st-ssc4: Remove duplicate code to test unsupported mode bits
Browse files Browse the repository at this point in the history
spi_setup() will test unsupported mode bits before calling spi->master->setup.
Thus remove duplicate code to test unsupported mode bits in spi_st_setup().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Axel Lin authored and Mark Brown committed Jan 14, 2015
1 parent f5bac70 commit b85bfc4
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drivers/spi/spi-st-ssc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,6 @@ static int spi_st_setup(struct spi_device *spi)
int cs = spi->cs_gpio;
int ret;

if (spi->mode & ~MODEBITS) {
dev_err(&spi->dev, "unsupported mode bits 0x%x\n",
spi->mode & ~MODEBITS);
return -EINVAL;
}

if (!hz) {
dev_err(&spi->dev, "max_speed_hz unspecified\n");
return -EINVAL;
Expand Down

0 comments on commit b85bfc4

Please sign in to comment.