From: Lennert Buytenhek Date: Fri, 3 Oct 2008 22:23:39 +0000 (-0700) Subject: orion_spi: fix handling of default transfer speed X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f2fe1638f624467ae583b1a41a01804405f29eee;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git orion_spi: fix handling of default transfer speed Accept zero (the default!) as a per-transfer clock speed override. Signed-off-by: Lennert Buytenhek Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/spi/orion_spi.c b/drivers/spi/orion_spi.c index c4eaacd6e553..b872bfaf4bd2 100644 --- a/drivers/spi/orion_spi.c +++ b/drivers/spi/orion_spi.c @@ -427,7 +427,7 @@ static int orion_spi_transfer(struct spi_device *spi, struct spi_message *m) 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, "message rejected : " "device min speed (%d Hz) exceeds "