]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/spi/spi-atmel.c
spi/atmel: fix speed_hz check in atmel_spi_transfer()
[karo-tx-linux.git] / drivers / spi / spi-atmel.c
index 656d137db253b1d40cbc40428409f045610cca7b..80f5867c088b0c1dda382568b1869656d4544aa2 100644 (file)
@@ -847,8 +847,8 @@ static int atmel_spi_transfer(struct spi_device *spi, struct spi_message *msg)
                }
 
                /* 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;
                }