Module Name:    src
Committed By:   jruoho
Date:           Sat Apr 24 19:16:10 UTC 2010

Modified Files:
        src/sys/dev/acpi: acpi_tz.c

Log Message:
Remove retrieving the zone name via something called "REGN".

We really should not add code that aims to satisfy some oddball firmware,
not in the generic drivers that aim to comply with the specifications.
In the long-term this is even worse than quirk tables.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/sys/dev/acpi/acpi_tz.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/acpi/acpi_tz.c
diff -u src/sys/dev/acpi/acpi_tz.c:1.69 src/sys/dev/acpi/acpi_tz.c:1.70
--- src/sys/dev/acpi/acpi_tz.c:1.69	Sat Apr 24 19:11:48 2010
+++ src/sys/dev/acpi/acpi_tz.c	Sat Apr 24 19:16:10 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_tz.c,v 1.69 2010/04/24 19:11:48 jruoho Exp $ */
+/* $NetBSD: acpi_tz.c,v 1.70 2010/04/24 19:16:10 jruoho Exp $ */
 
 /*
  * Copyright (c) 2003 Jared D. McNeill <jmcne...@invisible.ca>
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.69 2010/04/24 19:11:48 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.70 2010/04/24 19:16:10 jruoho Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -75,7 +75,6 @@
 #define	ATZ2UKELVIN(t) ((t) * 100000 - 50000)
 
 struct acpitz_zone {
-	char			*name;
 	ACPI_BUFFER		 al[ATZ_NLEVELS];
 	uint32_t		 ac[ATZ_NLEVELS];
 	uint32_t		 crt;
@@ -190,12 +189,6 @@
 		&sc->sc_zone.fanmax, &sc->sc_zone.fancurrent) == 0)
 		sc->sc_have_fan = true;
 
-	rv = acpi_eval_string(sc->sc_node->ad_handle,
-	    "REGN", &sc->sc_zone.name);
-
-	if (ACPI_FAILURE(rv))
-		sc->sc_zone.name = __UNCONST("temperature");
-
 	acpitz_get_zone(self, 1);
 	acpitz_get_status(self);
 
@@ -728,8 +721,8 @@
 	sc->sc_temp_sensor.flags = flags;
 	sc->sc_temp_sensor.units = ENVSYS_STEMP;
 
-	(void)strlcpy(sc->sc_temp_sensor.desc,
-	    sc->sc_zone.name, sizeof(sc->sc_temp_sensor.desc));
+	(void)strlcpy(sc->sc_temp_sensor.desc, "temperature",
+	    sizeof(sc->sc_temp_sensor.desc));
 
 	if (sysmon_envsys_sensor_attach(sc->sc_sme, &sc->sc_temp_sensor))
 		goto out;

Reply via email to