Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Set the ENVSYS_FCHANGERFACT flag soon enough for ...
details: https://anonhg.NetBSD.org/src/rev/2382f5f3366c
branches: trunk
changeset: 762926:2382f5f3366c
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Sat Mar 05 22:27:21 2011 +0000
description:
Set the ENVSYS_FCHANGERFACT flag soon enough for it to make a difference.
diffstat:
sys/dev/ic/nslm7x.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diffs (51 lines):
diff -r a89888a6b59f -r 2382f5f3366c sys/dev/ic/nslm7x.c
--- a/sys/dev/ic/nslm7x.c Sat Mar 05 21:51:17 2011 +0000
+++ b/sys/dev/ic/nslm7x.c Sat Mar 05 22:27:21 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nslm7x.c,v 1.56 2010/10/06 18:13:33 jakllsch Exp $ */
+/* $NetBSD: nslm7x.c,v 1.57 2011/03/05 22:27:21 jakllsch Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nslm7x.c,v 1.56 2010/10/06 18:13:33 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nslm7x.c,v 1.57 2011/03/05 22:27:21 jakllsch Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1940,6 +1940,8 @@
for (i = 0; sensors[i].desc; i++) {
sc->sensors[i].units = sensors[i].type;
+ if (sc->sensors[i].units == ENVSYS_SVOLTS_DC)
+ sc->sensors[i].flags = ENVSYS_FCHANGERFACT;
strlcpy(sc->sensors[i].desc, sensors[i].desc,
sizeof(sc->sensors[i].desc));
sc->numsensors++;
@@ -1965,7 +1967,6 @@
if (data == 0xff) {
sc->sensors[n].state = ENVSYS_SINVALID;
} else {
- sc->sensors[n].flags = ENVSYS_FCHANGERFACT;
sc->sensors[n].value_cur = (data << 4);
if (sc->sensors[n].rfact) {
sc->sensors[n].value_cur *= sc->sensors[n].rfact;
@@ -2082,7 +2083,6 @@
int data;
data = (*sc->lm_readreg)(sc, sc->lm_sensors[n].reg);
- sc->sensors[n].flags = ENVSYS_FCHANGERFACT;
sc->sensors[n].value_cur = ((data << 4) - WB_VREF);
if (sc->sensors[n].rfact)
sc->sensors[n].value_cur *= sc->sensors[n].rfact;
@@ -2103,7 +2103,6 @@
data = (*sc->lm_readreg)(sc, sc->lm_sensors[n].reg);
sc->sensors[n].value_cur = ((data << 3) - WB_W83627EHF_VREF);
- sc->sensors[n].flags = ENVSYS_FCHANGERFACT;
if (sc->sensors[n].rfact)
sc->sensors[n].value_cur *= sc->sensors[n].rfact;
else
Home |
Main Index |
Thread Index |
Old Index