summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorJarkko Nikula <jarkko.nikula@linux.intel.com>2019-04-12 16:25:51 +0300
committerMark Brown <broonie@kernel.org>2019-05-02 10:37:49 +0900
commit76d2f7ee68b669c5825435bad204f3d9b4b55d18 (patch)
tree152bb91f6104be988b84f18b5d7062f52ab12e57 /drivers/spi
parent9231b4603ef266cdf242d44c3164d6ee69447a1b (diff)
spi: Remove one needless transfer speed fall back case
Falling back to maximum speed of the controller in case of SPI slave maximum speed is not set is needless. It already defaults to maximum speed of the controller since commit 052eb2d49006 ("spi: core: Set max_speed_hz of spi_device default to max_speed_hz of controller"). Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index bf4027b54a19..86a31340ad03 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -3084,8 +3084,6 @@ static int __spi_validate(struct spi_device *spi, struct spi_message *message)
if (!xfer->speed_hz)
xfer->speed_hz = spi->max_speed_hz;
- if (!xfer->speed_hz)
- xfer->speed_hz = ctlr->max_speed_hz;
if (ctlr->max_speed_hz && xfer->speed_hz > ctlr->max_speed_hz)
xfer->speed_hz = ctlr->max_speed_hz;