From 7cced077f802c559d55ca4a2a1b3a83f98961e52 Mon Sep 17 00:00:00 2001 From: Andreas Tobler Date: Sat, 4 Jun 2011 09:19:53 +0000 Subject: [PATCH] Replace the FCU_ZERO_C_TO_K with the ZERO_C_TO_K from powermac_thermal.h. Approved by: nwhitehorn (mentor) --- sys/dev/iicbus/ds1775.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sys/dev/iicbus/ds1775.c b/sys/dev/iicbus/ds1775.c index 364f4d1fb84d..23ad6f447015 100644 --- a/sys/dev/iicbus/ds1775.c +++ b/sys/dev/iicbus/ds1775.c @@ -51,8 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include -#define FCU_ZERO_C_TO_K 2732 - /* Drivebay sensor: LM75/DS1775. */ #define DS1775_TEMP 0x0 @@ -211,12 +209,12 @@ ds1775_start(void *xdev) /* Make up target temperatures. These are low, for the drive bay. */ if (sc->sc_sensor.zone == 0) { - sc->sc_sensor.target_temp = 500 + FCU_ZERO_C_TO_K; - sc->sc_sensor.max_temp = 600 + FCU_ZERO_C_TO_K; + sc->sc_sensor.target_temp = 500 + ZERO_C_TO_K; + sc->sc_sensor.max_temp = 600 + ZERO_C_TO_K; } else { - sc->sc_sensor.target_temp = 300 + FCU_ZERO_C_TO_K; - sc->sc_sensor.max_temp = 600 + FCU_ZERO_C_TO_K; + sc->sc_sensor.target_temp = 300 + ZERO_C_TO_K; + sc->sc_sensor.max_temp = 600 + ZERO_C_TO_K; } sc->sc_sensor.read = @@ -248,7 +246,7 @@ ds1775_sensor_read(struct ds1775_softc *sc) /* The default mode of the ADC is 9 bit, the resolution is 0.5 C per bit. The temperature is in tenth kelvin. */ - return (((int16_t)(read) >> 7) * 5 + FCU_ZERO_C_TO_K); + return (((int16_t)(read) >> 7) * 5 + ZERO_C_TO_K); } static int