summaryrefslogtreecommitdiffstats
path: root/.gitignore
diff options
context:
space:
mode:
authorPaul Barker <pbarker@konsulko.com>2020-11-11 16:46:43 +0000
committerGuenter Roeck <linux@roeck-us.net>2020-11-12 07:00:54 -0800
commitfd8feec665fef840277515a5c2b9b7c3e3970fad (patch)
treecee3b5b44d0cf93b98c97d6464ce6ea4d2ccac33 /.gitignore
parent18e8db7f6526928858dfa99b49d831497f0f8df8 (diff)
downloadlinux-fd8feec665fef840277515a5c2b9b7c3e3970fad.tar.bz2
hwmon: (pwm-fan) Fix RPM calculation
To convert the number of pulses counted into an RPM estimation, we need to divide by the width of our measurement interval instead of multiplying by it. If the width of the measurement interval is zero we don't update the RPM value to avoid dividing by zero. We also don't need to do 64-bit division, with 32-bits we can handle a fan running at over 4 million RPM. Signed-off-by: Paul Barker <pbarker@konsulko.com> Link: https://lore.kernel.org/r/20201111164643.7087-1-pbarker@konsulko.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions