spi: core: Use master->max_speed_hz as transfer speed when xfer->speed_hz > master...
authorAxel Lin <axel.lin@ingics.com>
Mon, 17 Mar 2014 02:08:12 +0000 (10:08 +0800)
committerMark Brown <broonie@linaro.org>
Mon, 17 Mar 2014 15:46:25 +0000 (15:46 +0000)
commita6f87fad7b5132f026592729ccf65b995cdec35d
tree24bb5827e380833ab8066b0ac9ed8fa57a8cda19
parent6ea312936d68b557766dafa9a3c4617e14ffa076
spi: core: Use master->max_speed_hz as transfer speed when xfer->speed_hz > master->max_speed_hz

When xfer->speed_hz is greater than master->max_speed_hz, it's generally safe
to use master->max_speed_hz as transfer speed.
Thus use master->max_speed_hz as transfer speed rather than return error when
xfer->speed_hz > master->max_speed_hz.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi.c