Merge branch 'for-2.6.31' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
[pandora-kernel.git] / drivers / spi / spi_s3c24xx.c
index b3ebc1d..e0d44af 100644 (file)
@@ -146,32 +146,16 @@ static int s3c24xx_spi_setupxfer(struct spi_device *spi,
        return 0;
 }
 
-/* the spi->mode bits understood by this driver: */
-#define MODEBITS (SPI_CPOL | SPI_CPHA | SPI_CS_HIGH)
-
 static int s3c24xx_spi_setup(struct spi_device *spi)
 {
        int ret;
 
-       if (!spi->bits_per_word)
-               spi->bits_per_word = 8;
-
-       if (spi->mode & ~MODEBITS) {
-               dev_dbg(&spi->dev, "setup: unsupported mode bits %x\n",
-                       spi->mode & ~MODEBITS);
-               return -EINVAL;
-       }
-
        ret = s3c24xx_spi_setupxfer(spi, NULL);
        if (ret < 0) {
                dev_err(&spi->dev, "setupxfer returned %d\n", ret);
                return ret;
        }
 
-       dev_dbg(&spi->dev, "%s: mode %d, %u bpw, %d hz\n",
-               __func__, spi->mode, spi->bits_per_word,
-               spi->max_speed_hz);
-
        return 0;
 }
 
@@ -290,6 +274,9 @@ static int __init s3c24xx_spi_probe(struct platform_device *pdev)
 
        /* setup the master state. */
 
+       /* the spi->mode bits understood by this driver: */
+       master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
+
        master->num_chipselect = hw->pdata->num_cs;
        master->bus_num = pdata->bus_num;