diff options
author | Mark Brown | 2020-12-17 17:09:51 +0000 |
---|---|---|
committer | Mark Brown | 2020-12-17 17:09:51 +0000 |
commit | 127a7a95df41731632c7348960908751f7f9d049 (patch) | |
tree | cecfac58b9550a602555a02a9d583ed0f3378b38 /drivers/spi/spi.c | |
parent | 2fee9583198eb97b5351feda7bd825e0f778385c (diff) | |
parent | 9326e4f1e5dd1a4410c429638d3c412b6fc17040 (diff) |
Merge remote-tracking branch 'spi/for-5.10' into spi-5.11
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r-- | drivers/spi/spi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index cd3c395b4e90..51d7c004fbab 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -3378,7 +3378,8 @@ int spi_setup(struct spi_device *spi) if (status) return status; - if (!spi->max_speed_hz) + if (!spi->max_speed_hz || + spi->max_speed_hz > spi->controller->max_speed_hz) spi->max_speed_hz = spi->controller->max_speed_hz; mutex_lock(&spi->controller->io_mutex); |