svn commit: r222673 - head/sys/dev/iicbus

Andreas Tobler andreast at FreeBSD.org
Sat Jun 4 09:19:53 UTC 2011


Author: andreast
Date: Sat Jun  4 09:19:53 2011
New Revision: 222673
URL: http://svn.freebsd.org/changeset/base/222673

Log:
  Replace the FCU_ZERO_C_TO_K with the ZERO_C_TO_K from powermac_thermal.h.
  
  Approved by:	nwhitehorn (mentor)

Modified:
  head/sys/dev/iicbus/ds1775.c

Modified: head/sys/dev/iicbus/ds1775.c
==============================================================================
--- head/sys/dev/iicbus/ds1775.c	Sat Jun  4 08:24:58 2011	(r222672)
+++ head/sys/dev/iicbus/ds1775.c	Sat Jun  4 09:19:53 2011	(r222673)
@@ -51,8 +51,6 @@ __FBSDID("$FreeBSD$");
 #include <dev/ofw/ofw_bus.h>
 #include <powerpc/powermac/powermac_thermal.h>
 
-#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 *
 	/* 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


More information about the svn-src-all mailing list