spi: txx9: Use transfer speed unconditionally
authorJarkko Nikula <jarkko.nikula@linux.intel.com>
Tue, 15 Sep 2015 13:26:13 +0000 (16:26 +0300)
committerMark Brown <broonie@kernel.org>
Wed, 16 Sep 2015 19:52:52 +0000 (20:52 +0100)
SPI core validates the transfer speed and defaults to spi->max_speed_hz in
case the transfer speed is not set.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-txx9.c

index 9190124b6d9095c653b8f51ac92e915ade8c2e22..d69f8f8f3fa698d1eb34c744ea25e0058035ad82 100644 (file)
@@ -181,7 +181,7 @@ static void txx9spi_work_one(struct txx9spi *c, struct spi_message *m)
                u32 data;
                unsigned int len = t->len;
                unsigned int wsize;
-               u32 speed_hz = t->speed_hz ? : spi->max_speed_hz;
+               u32 speed_hz = t->speed_hz;
                u8 bits_per_word = t->bits_per_word;
 
                wsize = bits_per_word >> 3; /* in bytes */