Skip to contentSkip to conversation

orion_spi: bugfix handling of default transfer speed

PATCH New David Brownell 1 participant 1 message Sep 25, 2008 SPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 orion_spi: bugfix handling of default transfer speed

From: Lennert Buytenhek <buytenh-OLH4Qvv75CYX/[email protected]>

Accept zero (the default!) as a per-transfer clock speed override.

---
Seems important for 2.6.27-final ... this driver won't have worked well at all with this bug!

 drivers/spi/orion_spi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/orion_spi.c +1 -1
@@ -432,7 +432,7 @@ static int orion_spi_transfer(struct spi
 			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 "

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/