summaryrefslogtreecommitdiff
path: root/drivers/hwmon/hih6130.c
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2014-08-05 16:54:04 (GMT)
committerGuenter Roeck <linux@roeck-us.net>2014-08-06 00:49:12 (GMT)
commit539a719f9b90f37b934b90ad52be646b9e74a9f6 (patch)
treeb3dc5d7646eea41985183f9c10d57d12e6b5f12c /drivers/hwmon/hih6130.c
parente981429557cbe10c780fab1c1a237cb832757652 (diff)
downloadlinux-539a719f9b90f37b934b90ad52be646b9e74a9f6.tar.xz
hwmon: (emc6w201) Fix temperature limit range
Temperature limit range is [-127, 127], not [-127, 128]. The wrong range caused a bad limit to be written into the chip if the limit was set to a value of 128 degrees C or above. Also use DIV_ROUND_CLOSEST instead of a plain divide operation to reduce the rounding error when writing temperature limits. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <jdelvare@suse.de>
Diffstat (limited to 'drivers/hwmon/hih6130.c')
0 files changed, 0 insertions, 0 deletions