From: Mark Brown Date: Mon, 13 May 2013 14:27:18 +0000 (+0400) Subject: Merge remote-tracking branch 'spi/fix/grant' into spi-linus X-Git-Url: https://git.stricted.de/?p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git;a=commitdiff_plain;h=88b0357dde1c2721a64268e4601d1c2dec1158b0 Merge remote-tracking branch 'spi/fix/grant' into spi-linus --- 88b0357dde1c2721a64268e4601d1c2dec1158b0 diff --cc drivers/spi/spi-atmel.c index d8cb7da65efe,80f5867c088b..380387a47b1d --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c @@@ -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; }