Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/acpi Adapt to changes in sysmon's limit structure.



details:   https://anonhg.NetBSD.org/src/rev/58626aa7532f
branches:  trunk
changeset: 752101:58626aa7532f
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Sun Feb 14 23:06:58 2010 +0000

description:
Adapt to changes in sysmon's limit structure.

diffstat:

 sys/dev/acpi/acpi_tz.c |  22 +++++++++++-----------
 sys/dev/acpi/atk0110.c |  16 ++++++++--------
 2 files changed, 19 insertions(+), 19 deletions(-)

diffs (140 lines):

diff -r 4717ef159755 -r 58626aa7532f sys/dev/acpi/acpi_tz.c
--- a/sys/dev/acpi/acpi_tz.c    Sun Feb 14 23:06:01 2010 +0000
+++ b/sys/dev/acpi/acpi_tz.c    Sun Feb 14 23:06:58 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_tz.c,v 1.57 2010/02/01 09:45:04 jruoho Exp $ */
+/* $NetBSD: acpi_tz.c,v 1.58 2010/02/14 23:06:58 pgoyette Exp $ */
 
 /*
  * Copyright (c) 2003 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.57 2010/02/01 09:45:04 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.58 2010/02/14 23:06:58 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -144,7 +144,7 @@
 static void    acpitz_tick(void *);
 static void    acpitz_init_envsys(device_t);
 static void    acpitz_get_limits(struct sysmon_envsys *, envsys_data_t *,
-                                 sysmon_envsys_lim_t *);
+                                 sysmon_envsys_lim_t *, uint32_t *);
 static int     acpitz_get_fanspeed(device_t, UINT32 *, UINT32 *, UINT32 *);
 #ifdef notyet
 static ACPI_STATUS
@@ -712,40 +712,40 @@
 
 static void
 acpitz_get_limits(struct sysmon_envsys *sme, envsys_data_t *edata,
-                 sysmon_envsys_lim_t *limits)
+                 sysmon_envsys_lim_t *limits, uint32_t *props)
 {
        struct acpitz_softc *sc = sme->sme_cookie;
        int i;
 
        switch (edata->units) {
        case ENVSYS_STEMP:
-               limits->sel_flags = 0;
+               *props = 0;
                if (sc->sc_zone.hot != ATZ_TMP_INVALID) {
-                       limits->sel_flags |= PROP_CRITMAX;
+                       *props |= PROP_CRITMAX;
                        limits->sel_critmax = ATZ2UKELVIN(sc->sc_zone.hot);
                } else if (sc->sc_zone.crt != ATZ_TMP_INVALID) {
-                       limits->sel_flags |= PROP_CRITMAX;
+                       *props |= PROP_CRITMAX;
                        limits->sel_critmax = ATZ2UKELVIN(sc->sc_zone.crt);
                }
                for (i = 0; i < ATZ_NLEVELS; i++) {
                        if (sc->sc_zone.ac[i] != ATZ_TMP_INVALID) {
                                limits->sel_warnmax =
                                    ATZ2UKELVIN(sc->sc_zone.ac[i]);
-                               limits->sel_flags |= PROP_WARNMAX;
+                               *props |= PROP_WARNMAX;
                                break;
                        }
                }
                break;
 
        case ENVSYS_SFANRPM:
-               limits->sel_flags = 0;
+               *props = 0;
                if (sc->sc_zone.fanmin != ATZ_TMP_INVALID) {
-                       limits->sel_flags |= PROP_WARNMIN;
+                       *props |= PROP_WARNMIN;
                        limits->sel_warnmin = sc->sc_zone.fanmin;
                        sc->sc_fan_sensor.flags |= ENVSYS_FVALID_MIN;
                }
                if (sc->sc_zone.fanmax != ATZ_TMP_INVALID) {
-                       limits->sel_flags |= PROP_WARNMAX;
+                       *props |= PROP_WARNMAX;
                        limits->sel_warnmax = sc->sc_zone.fanmax;
                        sc->sc_fan_sensor.flags |= ENVSYS_FVALID_MAX;
                }
diff -r 4717ef159755 -r 58626aa7532f sys/dev/acpi/atk0110.c
--- a/sys/dev/acpi/atk0110.c    Sun Feb 14 23:06:01 2010 +0000
+++ b/sys/dev/acpi/atk0110.c    Sun Feb 14 23:06:58 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atk0110.c,v 1.4 2010/02/11 06:54:57 cnst Exp $ */
+/*     $NetBSD: atk0110.c,v 1.5 2010/02/14 23:06:58 pgoyette Exp $     */
 /*     $OpenBSD: atk0110.c,v 1.1 2009/07/23 01:38:16 cnst Exp $        */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atk0110.c,v 1.4 2010/02/11 06:54:57 cnst Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atk0110.c,v 1.5 2010/02/14 23:06:58 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -66,7 +66,7 @@
 static int aibs_detach(device_t, int);
 static void aibs_refresh(struct sysmon_envsys *, envsys_data_t *);
 static void aibs_get_limits(struct sysmon_envsys *, envsys_data_t *,
-    sysmon_envsys_lim_t *);
+    sysmon_envsys_lim_t *, uint32_t *);
 
 static void aibs_attach_sif(device_t, enum envsys_units);
 
@@ -355,7 +355,7 @@
 
 static void
 aibs_get_limits(struct sysmon_envsys *sme, envsys_data_t *edata,
-    sysmon_envsys_lim_t *limits)
+    sysmon_envsys_lim_t *limits, uint32_t *props)
 {
        struct aibs_softc       *sc = sme->sme_cookie;
        envsys_data_t           *s = edata;
@@ -389,23 +389,23 @@
        case ENVSYS_STEMP:
                li->sel_critmax = h * 100 * 1000 + 273150000;
                li->sel_warnmax = l * 100 * 1000 + 273150000;
-               li->sel_flags = PROP_CRITMAX | PROP_WARNMAX;
+               *props = PROP_CRITMAX | PROP_WARNMAX;
                break;
        case ENVSYS_SFANRPM:
                /* some boards have strange limits for fans */
                if (l == 0) {
                        li->sel_warnmin = h;
-                       li->sel_flags = PROP_WARNMIN;
+                       *props = PROP_WARNMIN;
                } else {
                        li->sel_warnmin = l;
                        li->sel_warnmax = h;
-                       li->sel_flags = PROP_WARNMIN | PROP_WARNMAX;
+                       *props = PROP_WARNMIN | PROP_WARNMAX;
                }
                break;
        case ENVSYS_SVOLTS_DC:
                li->sel_critmin = l * 1000;
                li->sel_critmax = h * 1000;
-               li->sel_flags = PROP_CRITMIN | PROP_CRITMAX;
+               *props = PROP_CRITMIN | PROP_CRITMAX;
                break;
        default:
                /* NOTREACHED */



Home | Main Index | Thread Index | Old Index