Module Name: src
Committed By: pgoyette
Date: Mon Jun 20 15:00:04 UTC 2011
Modified Files:
src/sys/dev/acpi: thinkpad_acpi.c
Log Message:
Initialize sensor state before trying to register.
To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/acpi/thinkpad_acpi.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/acpi/thinkpad_acpi.c
diff -u src/sys/dev/acpi/thinkpad_acpi.c:1.38 src/sys/dev/acpi/thinkpad_acpi.c:1.39
--- src/sys/dev/acpi/thinkpad_acpi.c:1.38 Mon Jun 6 17:53:01 2011
+++ src/sys/dev/acpi/thinkpad_acpi.c Mon Jun 20 15:00:04 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: thinkpad_acpi.c,v 1.38 2011/06/06 17:53:01 pgoyette Exp $ */
+/* $NetBSD: thinkpad_acpi.c,v 1.39 2011/06/20 15:00:04 pgoyette Exp $ */
/*-
* Copyright (c) 2007 Jared D. McNeill <[email protected]>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: thinkpad_acpi.c,v 1.38 2011/06/06 17:53:01 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: thinkpad_acpi.c,v 1.39 2011/06/20 15:00:04 pgoyette Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -472,6 +472,7 @@
for (i = j = 0; i < THINKPAD_NTEMPSENSORS; i++) {
sc->sc_sensor[i].units = ENVSYS_STEMP;
+ sc->sc_sensor[i].state = ENVSYS_SINVALID;
(void)snprintf(sc->sc_sensor[i].desc,
sizeof(sc->sc_sensor[i].desc), "temperature %d", i);
@@ -484,6 +485,7 @@
for (i = THINKPAD_NTEMPSENSORS; i < THINKPAD_NSENSORS; i++, j++) {
sc->sc_sensor[i].units = ENVSYS_SFANRPM;
+ sc->sc_sensor[i].state = ENVSYS_SINVALID;
(void)snprintf(sc->sc_sensor[i].desc,
sizeof(sc->sc_sensor[i].desc), "fan speed %d", j);