spi: octeon: Use transfer speed unconditionally
authorJarkko Nikula <jarkko.nikula@linux.intel.com>
Tue, 15 Sep 2015 13:26:15 +0000 (16:26 +0300)
committerMark Brown <broonie@kernel.org>
Wed, 16 Sep 2015 19:53:19 +0000 (20:53 +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-octeon.c

index e99d6a93d3943c8b578fbd4a00ecba152d0881c5..07e4ce8273df56533aee2e8adf563c6026a956c0 100644 (file)
@@ -65,7 +65,7 @@ static int octeon_spi_do_transfer(struct octeon_spi *p,
        cpha = mode & SPI_CPHA;
        cpol = mode & SPI_CPOL;
 
-       speed_hz = xfer->speed_hz ? : spi->max_speed_hz;
+       speed_hz = xfer->speed_hz;
 
        clkdiv = octeon_get_io_clock_rate() / (2 * speed_hz);