Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/i2c ibmhawk_set: No need to set states ENVSYS_SWARNx...
details: https://anonhg.NetBSD.org/src/rev/23a4ad52680e
branches: trunk
changeset: 762052:23a4ad52680e
user: hannken <hannken%NetBSD.org@localhost>
date: Mon Feb 14 14:15:25 2011 +0000
description:
ibmhawk_set: No need to set states ENVSYS_SWARNxxx, sysmon will do it.
diffstat:
sys/dev/i2c/ibmhawk.c | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diffs (29 lines):
diff -r 04c10b16dfaf -r 23a4ad52680e sys/dev/i2c/ibmhawk.c
--- a/sys/dev/i2c/ibmhawk.c Mon Feb 14 13:43:45 2011 +0000
+++ b/sys/dev/i2c/ibmhawk.c Mon Feb 14 14:15:25 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ibmhawk.c,v 1.1 2011/02/14 08:50:39 hannken Exp $ */
+/* $NetBSD: ibmhawk.c,v 1.2 2011/02/14 14:15:25 hannken Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -318,15 +318,11 @@
"failed to attach \"%s\"\n", dp->desc);
}
- dp->value_cur = ibmhawk_normalize(value, dp->units);
- if (!valid)
+ if (valid) {
+ dp->value_cur = ibmhawk_normalize(value, dp->units);
+ dp->state = ENVSYS_SVALID;
+ } else
dp->state = ENVSYS_SINVALID;
- else if (sd->ihs_warnmin != 0 && value < sd->ihs_warnmin)
- dp->state = ENVSYS_SWARNUNDER;
- else if (sd->ihs_warnmax != 0 && value > sd->ihs_warnmax)
- dp->state = ENVSYS_SWARNOVER;
- else
- dp->state = ENVSYS_SVALID;
}
static void
Home |
Main Index |
Thread Index |
Old Index