Author: nwhitehorn Date: Sun May 29 19:53:46 2011 New Revision: 222461 URL: http://svn.freebsd.org/changeset/base/222461
Log: Move the celsius-to-kelvin conversion to a place that powermac_thermal can see it as well. Modified: head/sys/dev/iicbus/max6690.c Modified: head/sys/dev/iicbus/max6690.c ============================================================================== --- head/sys/dev/iicbus/max6690.c Sun May 29 19:53:11 2011 (r222460) +++ head/sys/dev/iicbus/max6690.c Sun May 29 19:53:46 2011 (r222461) @@ -329,7 +329,7 @@ max6690_sensor_read(struct max6690_senso */ temp = (integer * 10) + (fraction >> 5) * 10 / 8; - return (temp); + return (temp + FCU_ZERO_C_TO_K); } static int @@ -338,7 +338,6 @@ max6690_sensor_sysctl(SYSCTL_HANDLER_ARG device_t dev; struct max6690_softc *sc; struct max6690_sensor *sens; - int value = 0; int error; unsigned int temp; @@ -346,12 +345,10 @@ max6690_sensor_sysctl(SYSCTL_HANDLER_ARG sc = device_get_softc(dev); sens = &sc->sc_sensors[arg2]; - value = max6690_sensor_read(sens); - if (value < 0) + temp = max6690_sensor_read(sens); + if (temp < 0) return (EIO); - temp = value + FCU_ZERO_C_TO_K; - error = sysctl_handle_int(oidp, &temp, 0, req); return (error); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"