mbox series

[v3,0/2] Fix RPM calculation in pwm-fan

Message ID 20201110112817.52549-1-pbarker@konsulko.com (mailing list archive)
Headers show
Series Fix RPM calculation in pwm-fan | expand

Message

Paul Barker Nov. 10, 2020, 11:28 a.m. UTC
Fix inaccuracy and inefficiency when calculating fan RPM in the pwm-fan
driver.

These changes can also be pulled from:

  https://gitlab.com/pbarker.dev/staging/linux.git
  tag: for-hwmon/pwm-fan-fix-rpm-v3_2020-11-10

Changes from v2:

  * Handle the case where delta=0 to avoid potential divide-by-zero
    exceptions.

  * Store a device pointer in pwm_fan_ctx so we can print an error
    message.

Paul Barker (2):
  hwmon: pwm-fan: Store device pointer in pwm_fan_ctx
  hwmon: pwm-fan: Fix RPM calculation

 drivers/hwmon/pwm-fan.c | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)


base-commit: f8394f232b1eab649ce2df5c5f15b0e528c92091