diff options
author | Axel Lin <axel.lin@ingics.com> | 2015-01-05 09:49:36 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-01-14 14:16:56 -0500 |
commit | b85bfc444c426f476e68000d5b7e64a3200c3892 (patch) | |
tree | 014c75c48192ce759be9748352c02b0c5e543445 /drivers/spi/spi-st-ssc4.c | |
parent | f5bac70f4fec1fdc7798f025edd5666c17bcf51f (diff) |
spi: st-ssc4: Remove duplicate code to test unsupported mode bits
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>
Diffstat (limited to 'drivers/spi/spi-st-ssc4.c')
-rw-r--r-- | drivers/spi/spi-st-ssc4.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/spi/spi-st-ssc4.c b/drivers/spi/spi-st-ssc4.c index 8f8770a97ba7..2faeaa7b57a8 100644 --- a/drivers/spi/spi-st-ssc4.c +++ b/drivers/spi/spi-st-ssc4.c | |||
@@ -217,12 +217,6 @@ static int spi_st_setup(struct spi_device *spi) | |||
217 | int cs = spi->cs_gpio; | 217 | int cs = spi->cs_gpio; |
218 | int ret; | 218 | int ret; |
219 | 219 | ||
220 | if (spi->mode & ~MODEBITS) { | ||
221 | dev_err(&spi->dev, "unsupported mode bits 0x%x\n", | ||
222 | spi->mode & ~MODEBITS); | ||
223 | return -EINVAL; | ||
224 | } | ||
225 | |||
226 | if (!hz) { | 220 | if (!hz) { |
227 | dev_err(&spi->dev, "max_speed_hz unspecified\n"); | 221 | dev_err(&spi->dev, "max_speed_hz unspecified\n"); |
228 | return -EINVAL; | 222 | return -EINVAL; |