Commit f2fe1638 authored by Lennert Buytenhek's avatar Lennert Buytenhek Committed by Linus Torvalds

orion_spi: fix handling of default transfer speed

Accept zero (the default!) as a per-transfer clock speed override.
Signed-off-by: default avatarLennert Buytenhek <buytenh@marvell.com>
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent aef7db4b
...@@ -427,7 +427,7 @@ static int orion_spi_transfer(struct spi_device *spi, struct spi_message *m) ...@@ -427,7 +427,7 @@ static int orion_spi_transfer(struct spi_device *spi, struct spi_message *m)
goto msg_rejected; goto msg_rejected;
} }
if (t->speed_hz < orion_spi->min_speed) { if (t->speed_hz && t->speed_hz < orion_spi->min_speed) {
dev_err(&spi->dev, dev_err(&spi->dev,
"message rejected : " "message rejected : "
"device min speed (%d Hz) exceeds " "device min speed (%d Hz) exceeds "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment