summaryrefslogtreecommitdiffstats
path: root/drivers/w1/slaves/w1_therm.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-01-24 10:07:21 +1100
committerPaul Mackerras <paulus@samba.org>2008-01-24 10:07:21 +1100
commit9156ad48338e0306e508ead5c0d9986050744475 (patch)
tree37f3a90e38190052ecf3cdf9171dfdddd37b56fd /drivers/w1/slaves/w1_therm.c
parentfa28237cfcc5827553044cbd6ee52e33692b0faa (diff)
parent8f7b3d156d348b6766833cd4e272d0d19b501e64 (diff)
downloadop-kernel-dev-9156ad48338e0306e508ead5c0d9986050744475.zip
op-kernel-dev-9156ad48338e0306e508ead5c0d9986050744475.tar.gz
Merge branch 'linux-2.6'
Diffstat (limited to 'drivers/w1/slaves/w1_therm.c')
-rw-r--r--drivers/w1/slaves/w1_therm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/w1/slaves/w1_therm.c b/drivers/w1/slaves/w1_therm.c
index 4318935..112f4ec 100644
--- a/drivers/w1/slaves/w1_therm.c
+++ b/drivers/w1/slaves/w1_therm.c
@@ -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;
}
}
OpenPOWER on IntegriCloud