Files
android_kernel_xiaomi_sm8450/drivers
Xu Yilun 501e1875da spi: fix the divide by 0 error when calculating xfer waiting time
[ Upstream commit 6170d077bf92c5b3dfbe1021688d3c0404f7c9e9 ]

The xfer waiting time is the result of xfer->len / xfer->speed_hz. This
patch makes the assumption of 100khz xfer speed if the xfer->speed_hz is
not assigned and stays 0. This avoids the divide by 0 issue and ensures
a reasonable tolerant waiting time.

Signed-off-by: Xu Yilun <yilun.xu@intel.com>
Link: https://lore.kernel.org/r/1609723749-3557-1-git-send-email-yilun.xu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-01-19 18:27:25 +01:00
..
2021-01-06 14:56:56 +01:00
2020-12-03 10:00:23 +01:00
2021-01-17 14:17:03 +01:00
2021-01-09 13:46:22 +01:00
2020-10-27 19:23:04 +01:00
2020-12-30 11:53:53 +01:00
2021-01-17 14:17:02 +01:00