Module Name: src
Committed By: pgoyette
Date: Mon Jun 20 18:12:06 UTC 2011
Modified Files:
src/sys/dev/ic: ug.c
Log Message:
Initialize sensor states before registering
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/ic/ug.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/ic/ug.c
diff -u src/sys/dev/ic/ug.c:1.11 src/sys/dev/ic/ug.c:1.12
--- src/sys/dev/ic/ug.c:1.11 Wed Mar 26 16:09:37 2008
+++ src/sys/dev/ic/ug.c Mon Jun 20 18:12:06 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: ug.c,v 1.11 2008/03/26 16:09:37 xtraeme Exp $ */
+/* $NetBSD: ug.c,v 1.12 2011/06/20 18:12:06 pgoyette Exp $ */
/*
* Copyright (c) 2007 Mihai Chelaru <[email protected]>
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ug.c,v 1.11 2008/03/26 16:09:37 xtraeme Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ug.c,v 1.12 2011/06/20 18:12:06 pgoyette Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -429,6 +429,10 @@
COPYDESCR(sc->sc_sensor[16].desc, "SYS Fan");
COPYDESCR(sc->sc_sensor[17].desc, "AUX Fan 1");
COPYDESCR(sc->sc_sensor[18].desc, "AUX Fan 2");
+
+ /* All sensors */
+ for (i = 0; i < UG_NUM_SENSORS; i++)
+ sc->sc_sensor[i].units = ENVSYS_SINVALID;
}
void