diff options
| author | xtraeme <xtraeme@NetBSD.org> | 2007-07-02 10:25:54 +0000 |
|---|---|---|
| committer | xtraeme <xtraeme@NetBSD.org> | 2007-07-02 10:25:54 +0000 |
| commit | 7c07c6cee56a034d22bec253c3e23af07ccf896c (patch) | |
| tree | 2974ab39b0107f73021d661aba578988e69088f9 /sys | |
| parent | df6f052d2fe1028a6696309cb28bf240021a636a (diff) | |
adt74673_refresh_{fan,temp,volt}: use the edata pointer rather than
using softc's edata array index.
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/dev/i2c/adt7463.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sys/dev/i2c/adt7463.c b/sys/dev/i2c/adt7463.c index 5a649b53a1c..c82a4910255 100644 --- a/sys/dev/i2c/adt7463.c +++ b/sys/dev/i2c/adt7463.c @@ -1,4 +1,4 @@ -/* $NetBSD: adt7463.c,v 1.9 2007/07/01 07:37:15 xtraeme Exp $ */ +/* $NetBSD: adt7463.c,v 1.10 2007/07/02 10:25:54 xtraeme Exp $ */ /* * Copyright (c) 2005 Anil Gopinath (anil_public@yahoo.com) @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: adt7463.c,v 1.9 2007/07/01 07:37:15 xtraeme Exp $"); +__KERNEL_RCSID(0, "$NetBSD: adt7463.c,v 1.10 2007/07/02 10:25:54 xtraeme Exp $"); /* Fan speed control added by Hanns Hartman */ #include <sys/param.h> @@ -244,9 +244,9 @@ adt7463c_refresh_volt(struct adt7463c_softc *sc, envsys_data_t *edata) /* envstat assumes that voltage is in uVDC */ if (data > 0) - sc->sc_sensor[i].value_cur = data * 100 * mult[i]; + edata->value_cur = data * 100 * mult[i]; else - sc->sc_sensor[i].state = ENVSYS_SINVALID; + edata->state = ENVSYS_SINVALID; } static void @@ -262,10 +262,9 @@ adt7463c_refresh_temp(struct adt7463c_softc *sc, envsys_data_t *edata) /* envstat assumes temperature is in micro kelvin */ if (data > 0) - sc->sc_sensor[i].value_cur = - (data * 100 + ADT7463_CEL_TO_KELVIN) * 10000; + edata->value_cur = (data * 100 + ADT7463_CEL_TO_KELVIN) * 10000; else - sc->sc_sensor[i].state = ENVSYS_SINVALID; + edata->state = ENVSYS_SINVALID; } static void @@ -298,9 +297,9 @@ adt7463c_refresh_fan(struct adt7463c_softc *sc, envsys_data_t *edata) /* calculate RPM */ if (val > 0) - sc->sc_sensor[i].value_cur = (ADT7463_RPM_CONST) / val; + edata->value_cur = (ADT7463_RPM_CONST) / val; else - sc->sc_sensor[i].state = ENVSYS_SINVALID; + edata->state = ENVSYS_SINVALID; } static int |
