Skip to content
Commit 080b98e9 authored by Guenter Roeck's avatar Guenter Roeck
Browse files

hwmon: (ina2xx) Fix word size register read and write operations



The driver uses be16_to_cpu and cpu_to_be16 to convert data in SMBus word
operations from chip to host byte order. However, the data passed from and to
the SMBus word API functions is in host byte order, not in chip byte order.
Conversion should therefore use swab16 instead of be16 to change the byte order.

Replace driver internal word conversion functions with SMBus API functions to
solve the problem.

Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Cc: stable@vger.kernel.org # 3.5+
Acked-by: default avatarJean Delvare <khali@linux-fr.org>
parent 73d7c119
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment