Re: [PATCH v3] spi: fix the divide by 0 error when calculating xfer waiting time

2021-01-04 Thread Mark Brown
On Mon, 4 Jan 2021 09:29:09 +0800, Xu Yilun wrote: > 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 w

[PATCH v3] spi: fix the divide by 0 error when calculating xfer waiting time

2021-01-03 Thread Xu Yilun
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 --- v2: use the norm