]> err.no Git - linux-2.6/blobdiff - drivers/w1/slaves/w1_therm.c
Merge branch 'dmapool' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc
[linux-2.6] / drivers / w1 / slaves / w1_therm.c
index 4318935678c5f68ad1559e4540f233fc30551a35..112f4ec59035424bc36b7251fcb6367c9bca7f77 100644 (file)
@@ -112,7 +112,7 @@ static struct w1_therm_family_converter w1_therm_families[] = {
 
 static inline int w1_DS18B20_convert_temp(u8 rom[9])
 {
-       int t = (rom[1] << 8) | rom[0];
+       s16 t = (rom[1] << 8) | rom[0];
        t /= 16;
        return t;
 }
@@ -204,7 +204,7 @@ static ssize_t w1_therm_read_bin(struct kobject *kobj,
 
                                crc = w1_calc_crc8(rom, 8);
 
-                               if (rom[8] == crc && rom[0])
+                               if (rom[8] == crc)
                                        verdict = 1;
                        }
                }