summaryrefslogtreecommitdiff
path: root/sys/dev/i2c/lm87.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/i2c/lm87.c')
-rw-r--r--sys/dev/i2c/lm87.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/i2c/lm87.c b/sys/dev/i2c/lm87.c
index da1699b6978..cbda3e501db 100644
--- a/sys/dev/i2c/lm87.c
+++ b/sys/dev/i2c/lm87.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lm87.c,v 1.4 2005/11/15 20:28:04 kettenis Exp $ */
+/* $OpenBSD: lm87.c,v 1.5 2005/11/15 20:40:45 deraadt Exp $ */
/*
* Copyright (c) 2005 Mark Kettenis
@@ -232,8 +232,11 @@ lmenv_refresh(void *arg)
break;
case LMENV_EXT_TEMP:
case LMENV_INT_TEMP:
- sc->sc_sensor[sensor].value =
- (int8_t)data * 1000000 + 273150000;
+ if (data == 0x80)
+ sc->sc_sensor[sensor].flags |= SENSOR_FINVALID;
+ else
+ sc->sc_sensor[sensor].value =
+ (int8_t)data * 1000000 + 273150000;
break;
case LMENV_FAN1:
tmp = data * sc->sc_fan1_div;