git.openpandora.org
/
pandora-kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
984faa1
)
hwmon: (adc128d818) Do proper sign extension
author
Rasmus Villemoes
<linux@rasmusvillemoes.dk>
Thu, 22 Jan 2015 22:44:14 +0000
(23:44 +0100)
committer
Guenter Roeck
<linux@roeck-us.net>
Mon, 26 Jan 2015 05:24:00 +0000
(21:24 -0800)
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: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/adc128d818.c
patch
|
blob
|
history
diff --cc
drivers/hwmon/adc128d818.c
Simple merge