linux/drivers/w1/slaves
David Fries 941ed3b530 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>
2008-01-22 09:17:48 -08:00
..
Kconfig Use menuconfig objects: W1 2007-07-16 09:05:40 -07:00
Makefile [BATTERY] ds2760 W1 slave 2007-07-10 11:28:31 +01:00
w1_ds2433.c some kmalloc/memset ->kzalloc (tree wide) 2007-07-19 10:04:50 -07:00
w1_ds2760.c git-battery vs git-acpi 2007-07-15 22:37:03 +04:00
w1_ds2760.h [BATTERY] ds2760 W1 slave 2007-07-10 11:28:31 +01:00
w1_smem.c [PATCH] w1: Userspace communication protocol over connector. 2006-06-22 11:22:50 -07:00
w1_therm.c W1: w1_therm.c ds18b20 decode freezing temperatures correctly 2008-01-22 09:17:48 -08:00