Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sparc64/dev Use machine_model from autoconf.c, inst...



details:   https://anonhg.NetBSD.org/src/rev/c4b8bb74a7e8
branches:  trunk
changeset: 790916:c4b8bb74a7e8
user:      jdc <jdc%NetBSD.org@localhost>
date:      Sat Oct 26 18:49:30 2013 +0000

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

diffstat:

 sys/arch/sparc64/dev/tda.c |  9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diffs (32 lines):

diff -r 390e0197289e -r c4b8bb74a7e8 sys/arch/sparc64/dev/tda.c
--- a/sys/arch/sparc64/dev/tda.c        Sat Oct 26 18:47:27 2013 +0000
+++ b/sys/arch/sparc64/dev/tda.c        Sat Oct 26 18:49:30 2013 +0000
@@ -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 @@
 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);
 
        /*



Home | Main Index | Thread Index | Old Index