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-Tag: v3.12-rc1~805^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=88b0357dde1c2721a64268e4601d1c2dec1158b0;p=kernel%2Fkernel-generic.git Merge remote-tracking branch 'spi/fix/grant' into spi-linus --- 88b0357dde1c2721a64268e4601d1c2dec1158b0 diff --cc drivers/spi/spi-atmel.c index d8cb7da,80f5867..380387a --- 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; }