1. 13 12月, 2016 1 次提交
    • G
      hwmon: (nct7802) Fix overflows seen when writing into limit attributes · c0d04e91
      Guenter Roeck 提交于
      Fix overflows seen when writing voltage and temperature limit attributes.
      
      The value passed to DIV_ROUND_CLOSEST() needs to be clamped, and the
      value parameter passed to nct7802_write_fan_min() is an unsigned long.
      
      Also, writing values larger than 2700000 into a fan limit attribute results
      in writing 0 into the chip's limit registers. The exact behavior when
      writing this value is unspecified. For consistency, report a limit of
      1350000 if the chip register reads 0. This may be wrong, and the chip
      behavior should be verified with the actual chip, but it is better than
      reporting a value of 0 (which, when written, results in writing a value
      of 0x1fff into the chip register).
      
      Fixes: 3434f378 ("hwmon: Driver for Nuvoton NCT7802Y")
      Reviewed-by: NJean Delvare <jdelvare@suse.de>
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      c0d04e91
  2. 10 12月, 2016 23 次提交
  3. 09 12月, 2016 2 次提交
  4. 03 12月, 2016 10 次提交
  5. 28 11月, 2016 3 次提交
  6. 27 11月, 2016 1 次提交