]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (ads1015) Handle negative conversion values correctly
authorPeter Rosin <peda@axentia.se>
Thu, 18 Feb 2016 13:07:52 +0000 (14:07 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Fri, 19 Feb 2016 03:14:04 +0000 (19:14 -0800)
commit176e93eff40b6e9a8bb55709357306487d5e393e
tree8e292f9dbac89fc11ea4edfcdc2ea41e9c319212
parent6f7ac95c87b62c01cc6bd12f75e64f8ab4e5f28b
hwmon: (ads1015) Handle negative conversion values correctly

Make the divisor signed as DIV_ROUND_CLOSEST is undefined for negative
dividends when the divisor is unsigned.

Signed-off-by: Peter Rosin <peda@axentia.se>
Cc: stable@vger.kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/ads1015.c