diff options
author | Trent Piepho <tpiepho@impinj.com> | 2018-02-12 20:38:14 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-02-14 17:04:58 +0100 |
commit | d704afffe65c8fab424963c1ba4ec4364c2d6a82 (patch) | |
tree | a572223ff30a9db9558305b3b6b83ae8bc83f31d /drivers/spi/spi-slave-system-control.c | |
parent | Linux 4.16-rc1 (diff) | |
download | linux-d704afffe65c8fab424963c1ba4ec4364c2d6a82.tar.xz linux-d704afffe65c8fab424963c1ba4ec4364c2d6a82.zip |
spi: bcm2835aux: Avoid 64-bit arithmetic in xfer len calc
We want to check for xfers that are over 30 microseconds. Rather than
find how many µs a xfer will take, instead find how many bytes can be
transferred in 30 µs. The latter must be less than 32 bits (since our
clock speed is limited to 32 bits), while the former involves 64 bit
quantities and more arithmetic operations.
Signed-off-by: Trent Piepho <tpiepho@impinj.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-slave-system-control.c')
0 files changed, 0 insertions, 0 deletions