diff options
author | Constantine A. Murenin <cnst@cvs.openbsd.org> | 2009-07-10 18:12:57 +0000 |
---|---|---|
committer | Constantine A. Murenin <cnst@cvs.openbsd.org> | 2009-07-10 18:12:57 +0000 |
commit | d2fc4e88a563a0b097187b63b912405a4f027d7a (patch) | |
tree | 85e783671fdc73e325a59925331353ab6d173d8a /sys/dev | |
parent | 0c5b8a79a46f2b93c226812c654b714be8f432d1 (diff) |
fix the complement in the 2's complement patch from yesterday; ok deraadt
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/i2c/sdtemp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/i2c/sdtemp.c b/sys/dev/i2c/sdtemp.c index 42d61b95983..db0d0b4630e 100644 --- a/sys/dev/i2c/sdtemp.c +++ b/sys/dev/i2c/sdtemp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sdtemp.c,v 1.10 2009/07/10 00:17:30 cnst Exp $ */ +/* $OpenBSD: sdtemp.c,v 1.11 2009/07/10 18:12:56 cnst Exp $ */ /* * Copyright (c) 2008 Theo de Raadt @@ -109,7 +109,7 @@ sdtemp_refresh(void *arg) &cmd, sizeof cmd, &data, sizeof data, 0) == 0) { sdata = betoh16(data) & 0x1fff; if (sdata & 0x1000) - sdata = -0x2000; + sdata -= 0x2000; sc->sc_sensor[JCTEMP_TEMP].value = 273150000 + 62500 * sdata; sc->sc_sensor[JCTEMP_TEMP].flags &= ~SENSOR_FINVALID; |