projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc0195a
)
spi: Fall back to master maximum speed if no slave speed specified
author
Mark Brown
<broonie@kernel.org>
Thu, 20 Aug 2015 18:52:18 +0000
(11:52 -0700)
committer
Mark Brown
<broonie@kernel.org>
Fri, 21 Aug 2015 17:24:04 +0000
(10:24 -0700)
If a slave appears with no maximum transfer speed specified fall back to
using the maximum for the master instead. It's questionable if we
should let slaves do this but let's be defensive.
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/spi/spi.c
b/drivers/spi/spi.c
index cf8b91b23a763d60f8253e3ef1e8ccd420e52a0c..637d892b316de6dceb8663eb47ad3887491830a6 100644
(file)
--- a/
drivers/spi/spi.c
+++ b/
drivers/spi/spi.c
@@
-1860,6
+1860,8
@@
static int __spi_validate(struct spi_device *spi, struct spi_message *message)
if (!xfer->speed_hz)
xfer->speed_hz = spi->max_speed_hz;
+ if (!xfer->speed_hz)
+ xfer->speed_hz = master->max_speed_hz;
if (master->max_speed_hz &&
xfer->speed_hz > master->max_speed_hz)