Merge remote-tracking branch 'spi/fix/grant' into spi-linus
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 13 May 2013 14:27:18 +0000 (18:27 +0400)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 13 May 2013 14:27:18 +0000 (18:27 +0400)
1  2 
drivers/spi/spi-atmel.c
drivers/spi/spi-davinci.c
drivers/spi/spi.c
include/linux/spi/spi.h

index d8cb7da65efe6b48baa84980e93cb53880dc4340,80f5867c088b0c1dda382568b1869656d4544aa2..380387a47b1d86fe4e6a8a7ef22a537bfb85517a
@@@ -1400,16 -846,9 +1400,16 @@@ static int atmel_spi_transfer(struct sp
                        }
                }
  
 +              if (xfer->bits_per_word > 8) {
 +                      if (xfer->len % 2) {
 +                              dev_dbg(&spi->dev, "buffer len should be 16 bits aligned\n");
 +                              return -EINVAL;
 +                      }
 +              }
 +
                /* FIXME implement these protocol options!! */
-               if (xfer->speed_hz) {
-                       dev_dbg(&spi->dev, "no protocol options yet\n");
+               if (xfer->speed_hz < spi->max_speed_hz) {
+                       dev_dbg(&spi->dev, "can't change speed in transfer\n");
                        return -ENOPROTOOPT;
                }
  
Simple merge
Simple merge
Simple merge