Files
linux/drivers
Fabio Baltieri 172a9e9a5f hwmon: (ina2xx) Cast to s16 on shunt and current regs
commit c0214f9894 upstream.

All devices supported by ina2xx are bidirectional and report the
measured shunt voltage and power values as a signed 16 bit, but the
current driver implementation caches all registers as u16, leading
to an incorrect sign extension when reporting to userspace in
ina2xx_get_value().

This patch fixes the problem by casting the signed registers to s16.
Tested on an INA219.

Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 11:14:01 -07:00
..
2013-12-08 07:29:25 -08:00
2014-03-06 21:30:14 -08:00
2014-06-07 13:25:39 -07:00
2014-04-14 06:42:18 -07:00
2014-07-06 18:54:15 -07:00
2014-02-22 12:41:27 -08:00
2014-02-20 11:06:11 -08:00
2014-04-03 12:01:05 -07:00