OSDN Git Service

spi: st-ssc4: Remove duplicate code to test unsupported mode bits
authorAxel Lin <axel.lin@ingics.com>
Mon, 5 Jan 2015 14:49:36 +0000 (22:49 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 14 Jan 2015 19:16:56 +0000 (19:16 +0000)
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>
drivers/spi/spi-st-ssc4.c

index 8f8770a..2faeaa7 100644 (file)
@@ -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;