Module Name:    src
Committed By:   jdc
Date:           Sat Oct 26 18:49:30 UTC 2013

Modified Files:
        src/sys/arch/sparc64/dev: tda.c

Log Message:
Use machine_model from autoconf.c, instead of calling the firmware here.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sparc64/dev/tda.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/arch/sparc64/dev/tda.c
diff -u src/sys/arch/sparc64/dev/tda.c:1.8 src/sys/arch/sparc64/dev/tda.c:1.9
--- src/sys/arch/sparc64/dev/tda.c:1.8	Sun Feb  3 10:58:28 2013
+++ src/sys/arch/sparc64/dev/tda.c	Sat Oct 26 18:49:30 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: tda.c,v 1.8 2013/02/03 10:58:28 jdc Exp $	*/
+/*	$NetBSD: tda.c,v 1.9 2013/10/26 18:49:30 jdc Exp $	*/
 /*	$OpenBSD: tda.c,v 1.4 2008/02/27 17:25:00 robert Exp $ */
 
 /*
@@ -19,7 +19,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tda.c,v 1.8 2013/02/03 10:58:28 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tda.c,v 1.9 2013/10/26 18:49:30 jdc Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -89,12 +89,9 @@ int
 tda_match(device_t parent, cfdata_t match, void *aux)
 {
 	struct i2c_attach_args *ia = aux;
-	char name[32];
 
 	/* Only attach on the Sun Blade 1000/2000. */
-	if (OF_getprop(findroot(), "name", name, sizeof(name)) <= 0)
-		return (0);
-	if (strcmp(name, "SUNW,Sun-Blade-1000") != 0)
+	if (strcmp(machine_model, "SUNW,Sun-Blade-1000") != 0)
 		return (0);
 
 	/*

Reply via email to