diff options
author | David Fries <david@fries.net> | 2008-01-22 12:31:37 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-01-22 18:17:48 +0100 |
commit | 941ed3b53086697eac7449f3ab5d2c5ab3259de2 (patch) | |
tree | cd0192ab9a6ab906edc59be1ccf92df49b206c9a /drivers/w1/slaves/w1_ds2433.c | |
parent | Makefile: Change typoed 'behavour' to 'behaviour' (diff) | |
download | linux-941ed3b53086697eac7449f3ab5d2c5ab3259de2.tar.xz linux-941ed3b53086697eac7449f3ab5d2c5ab3259de2.zip |
W1: w1_therm.c ds18b20 decode freezing temperatures correctly
Correct the decoding of negative C temperatures. The code did a binary OR
of two bytes to make a 16 bit value, but assignd it to an integer. This
caused the value to not be sign extended and to loose that it was a
negative number in the assignment.
Before the patch (in my freezer),
w1_slave
ed fe 4b 46 7f ff 03 10 e4 : crc=e4 YES
ed fe 4b 46 7f ff 03 10 e4 t=4078
With the patch,
e3 fe 4b 46 7f ff 0d 10 81 : crc=81 YES
e3 fe 4b 46 7f ff 0d 10 81 t=-17
Signed-off-by: David Fries <david@fries.net>
Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/w1/slaves/w1_ds2433.c')
0 files changed, 0 insertions, 0 deletions