summaryrefslogtreecommitdiffstats
path: root/sys/dev/i2c
diff options
context:
space:
mode:
authorcnst <cnst@openbsd.org>2007-10-17 16:38:51 +0000
committercnst <cnst@openbsd.org>2007-10-17 16:38:51 +0000
commit505fe72e12ca73ec668f4e30fe68fac10aee39dd (patch)
tree28b1e5f8bba2b5020b8f3d6746b851f1ca2613ef /sys/dev/i2c
parentUse TCSAFLUSH not TCSADRAIN when turning off echo and use TCSANOW when (diff)
downloadwireguard-openbsd-505fe72e12ca73ec668f4e30fe68fac10aee39dd.tar.xz
wireguard-openbsd-505fe72e12ca73ec668f4e30fe68fac10aee39dd.zip
clear the invalid flag for temperature sensors that are no longer invalid; ok deraadt
Diffstat (limited to 'sys/dev/i2c')
-rw-r--r--sys/dev/i2c/w83793g.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/i2c/w83793g.c b/sys/dev/i2c/w83793g.c
index ed0273f15af..288b1d3b089 100644
--- a/sys/dev/i2c/w83793g.c
+++ b/sys/dev/i2c/w83793g.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: w83793g.c,v 1.2 2007/10/14 15:31:28 deraadt Exp $ */
+/* $OpenBSD: w83793g.c,v 1.3 2007/10/17 16:38:51 cnst Exp $ */
/*
* Copyright (c) 2007 Constantine A. Murenin <cnst+openbsd@bugmail.mojo.ru>
@@ -232,6 +232,7 @@ wbng_refresh_temps(struct wbng_softc *sc)
data -= 0x100;
low = (tdlow & (0x03 << (i * 2))) >> (i * 2);
s[i].value = data * 1000000 + low * 250000 + 273150000;
+ s[i].flags &= ~SENSOR_FINVALID;
}
s += i;
@@ -250,6 +251,7 @@ wbng_refresh_temps(struct wbng_softc *sc)
if (data & 0x80)
data -= 0x100;
s[i].value = data * 1000000 + 273150000;
+ s[i].flags &= ~SENSOR_FINVALID;
}
}