]> 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)
commitf6def6ad3b5bff04537bf84c2fd6fce1c52fb253
tree8e292f9dbac89fc11ea4edfcdc2ea41e9c319212
parentcec9e4ee725e4528d0eb4d038d1cac55718d59c0
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