Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/acpi Initialize sensor state before trying to register.



details:   https://anonhg.NetBSD.org/src/rev/2cd327d266f8
branches:  trunk
changeset: 766302:2cd327d266f8
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Mon Jun 20 15:00:04 2011 +0000

description:
Initialize sensor state before trying to register.

diffstat:

 sys/dev/acpi/thinkpad_acpi.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r c3fe9555ff41 -r 2cd327d266f8 sys/dev/acpi/thinkpad_acpi.c
--- a/sys/dev/acpi/thinkpad_acpi.c      Mon Jun 20 13:26:58 2011 +0000
+++ b/sys/dev/acpi/thinkpad_acpi.c      Mon Jun 20 15:00:04 2011 +0000
@@ -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 <jmcneill%invisible.ca@localhost>
@@ -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);



Home | Main Index | Thread Index | Old Index