summaryrefslogtreecommitdiff
path: root/drivers/ps3
diff options
context:
space:
mode:
authorPaul Fertser <fercerpav@gmail.com>2021-09-24 12:30:11 +0300
committerGuenter Roeck <linux@roeck-us.net>2021-09-24 05:00:53 -0700
commit724e8af85854c4d3401313b6dd7d79cf792d8990 (patch)
treec43272ccd3b7381f3d7e3e452171d4f551b820cc /drivers/ps3
parent540effa7f283d25bcc13c0940d808002fee340b8 (diff)
hwmon: (tmp421) fix rounding for negative values
Old code produces -24999 for 0b1110011100000000 input in standard format due to always rounding up rather than "away from zero". Use the common macro for division, unify and simplify the conversion code along the way. Fixes: 9410700b881f ("hwmon: Add driver for Texas Instruments TMP421/422/423 sensor chips") Signed-off-by: Paul Fertser <fercerpav@gmail.com> Link: https://lore.kernel.org/r/20210924093011.26083-3-fercerpav@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/ps3')
0 files changed, 0 insertions, 0 deletions