commit | 6db78b201b3fa3611b9557f0d677cd4560358f9d | [log] [tgz] |
---|---|---|
author | Thierry Reding <thierry.reding@gmail.com> | Wed Apr 12 18:29:23 2017 +0200 |
committer | Thierry Reding <thierry.reding@gmail.com> | Thu Apr 13 17:34:54 2017 +0200 |
tree | 6a8601d0f02f647d29193005f8bd715f3c3922f8 | |
parent | 4a813b262f85ac34c9f3e557d9be79f846a381df [diff] |
pwm: tegra: Avoid potential overflow for short periods For very short periods, the result of the division might overflow the unsigned long hz variable (on 32-bit architectures). Avoid that by making it an unsigned long long. While at it, also remove an unneeded local variable whose only purpose is to store a temporary computation. Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>