Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Jun 2011 09:19:53 +0000 (UTC)
From:      Andreas Tobler <andreast@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r222673 - head/sys/dev/iicbus
Message-ID:  <201106040919.p549Jr0f002738@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106040919.p549Jr0f002738>