From c1af07659ef6b5b3a65a04015417902103867c9b Mon Sep 17 00:00:00 2001 From: pgoyette Date: Sun, 14 Jun 2009 19:44:46 +0000 Subject: [PATCH] Update {get,set}_limits() routines. --- sys/dev/i2c/sdtemp.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/sys/dev/i2c/sdtemp.c b/sys/dev/i2c/sdtemp.c index 3cb56ce248f1..1c833fd1005e 100644 --- a/sys/dev/i2c/sdtemp.c +++ b/sys/dev/i2c/sdtemp.c @@ -1,4 +1,4 @@ -/* $NetBSD: sdtemp.c,v 1.5 2009/06/13 20:27:19 pgoyette Exp $ */ +/* $NetBSD: sdtemp.c,v 1.6 2009/06/14 19:44:46 pgoyette Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sdtemp.c,v 1.5 2009/06/13 20:27:19 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sdtemp.c,v 1.6 2009/06/14 19:44:46 pgoyette Exp $"); #include #include @@ -62,9 +62,9 @@ CFATTACH_DECL_NEW(sdtemp, sizeof(struct sdtemp_softc), sdtemp_match, sdtemp_attach, NULL, NULL); static void sdtemp_refresh(struct sysmon_envsys *, envsys_data_t *); -static void sdtemp_get_limits(struct sysmon_envsys *, +static void sdtemp_get_limits(struct sysmon_envsys *, envsys_data_t *, sysmon_envsys_lim_t *); -static void sdtemp_set_limits(struct sysmon_envsys *, +static void sdtemp_set_limits(struct sysmon_envsys *, envsys_data_t *, sysmon_envsys_lim_t *); #ifdef NOT_YET static int sdtemp_read_8(struct sdtemp_softc *, uint8_t, uint8_t *); @@ -272,7 +272,7 @@ sdtemp_attach(device_t parent, device_t self, void *aux) aprint_error_dev(self, "couldn't establish power handler\n"); /* Retrieve and display hardware monitor limits */ - sdtemp_get_limits(sc->sc_sme, &limits); + sdtemp_get_limits(sc->sc_sme, sc->sc_sensor, &limits); aprint_normal_dev(self, ""); i = 0; if (limits.sel_flags & PROP_WARNMIN) { @@ -304,7 +304,8 @@ bad2: /* Retrieve current limits from device, and encode in uKelvins */ static void -sdtemp_get_limits(struct sysmon_envsys *sme, sysmon_envsys_lim_t *limits) +sdtemp_get_limits(struct sysmon_envsys *sme, envsys_data_t *edata, + sysmon_envsys_lim_t *limits) { struct sdtemp_softc *sc = sme->sme_cookie; uint16_t lim; @@ -328,7 +329,8 @@ sdtemp_get_limits(struct sysmon_envsys *sme, sysmon_envsys_lim_t *limits) /* Send current limit values to the device */ static void -sdtemp_set_limits(struct sysmon_envsys *sme, sysmon_envsys_lim_t *limits) +sdtemp_set_limits(struct sysmon_envsys *sme, envsys_data_t *edata, + sysmon_envsys_lim_t *limits) { uint16_t val; struct sdtemp_softc *sc = sme->sme_cookie;