Skip to content
Commit 2c3b1189 authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by Guenter Roeck
Browse files

hwmon: (adc128d818) Do proper sign extension



data->temp[index] has type s16. Because of C's promotion rules,
(data->temp[index] << 7) >> 7 is exactly the same as
data->temp[index]. The intention was to use bit 8 as a sign bit, so do
that using the existing API.

Signed-off-by: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 984faa1f
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