Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/newsmips Cleanup.



details:   https://anonhg.NetBSD.org/src/rev/161aebec7367
branches:  trunk
changeset: 474555:161aebec7367
user:      tsubai <tsubai%NetBSD.org@localhost>
date:      Sun Jul 11 12:44:04 1999 +0000

description:
Cleanup.

diffstat:

 sys/arch/newsmips/dev/hb.c         |  32 +++++++-------------------------
 sys/arch/newsmips/newsmips/clock.c |   4 ++--
 2 files changed, 9 insertions(+), 27 deletions(-)

diffs (89 lines):

diff -r 612b873bc338 -r 161aebec7367 sys/arch/newsmips/dev/hb.c
--- a/sys/arch/newsmips/dev/hb.c        Sun Jul 11 09:54:41 1999 +0000
+++ b/sys/arch/newsmips/dev/hb.c        Sun Jul 11 12:44:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hb.c,v 1.2 1998/06/05 14:19:22 tsubai Exp $    */
+/*     $NetBSD: hb.c,v 1.3 1999/07/11 12:44:04 tsubai Exp $    */
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -32,34 +32,16 @@
        return 1;
 }
 
-static char *hbdevs[] = {
-       "clock",
-       "fb",
-       "zsc",
-       "kb",
-       "ms",
-       "le",
-       "sc",
-       NULL
-};
-
 static void
 hb_attach(parent, self, aux)
        struct device *parent;
        struct device *self;
        void *aux;
 {
-       struct confargs ca;
-       char **p = hbdevs;
+       struct confargs *ca = aux;
 
        printf("\n");
-       bzero(&ca, sizeof(ca));
-
-       while (*p) {
-               ca.ca_name = *p;
-               config_search(hb_search, self, &ca);
-               p++;
-       }
+       config_search(hb_search, self, ca);
 }
 
 static int
@@ -71,8 +53,9 @@
        struct confargs *ca = aux;
 
        ca->ca_addr = cf->cf_addr;
+       ca->ca_name = cf->cf_driver->cd_name;
 
-       if ((*cf->cf_attach->ca_match)(parent, cf, ca) != 0)
+       if ((*cf->cf_attach->ca_match)(parent, cf, ca) > 0)
                config_attach(parent, cf, ca, hb_print);
 
        return 0;
@@ -91,11 +74,10 @@
 
        /* Be quiet about empty HB locations. */
        if (name)
-               return(QUIET);
+               return QUIET;
 
        if (ca->ca_addr != -1)
                printf(" addr 0x%x", ca->ca_addr);
 
-       return(UNCONF);
+       return UNCONF;
 }
-
diff -r 612b873bc338 -r 161aebec7367 sys/arch/newsmips/newsmips/clock.c
--- a/sys/arch/newsmips/newsmips/clock.c        Sun Jul 11 09:54:41 1999 +0000
+++ b/sys/arch/newsmips/newsmips/clock.c        Sun Jul 11 12:44:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clock.c,v 1.3 1999/02/15 04:36:35 hubertf Exp $        */
+/*     $NetBSD: clock.c,v 1.4 1999/07/11 12:44:05 tsubai Exp $ */
 /*
  * Copyright (c) 1988 University of Utah.
  * Copyright (c) 1992, 1993
@@ -74,7 +74,7 @@
 {
        struct confargs *ca = aux;
 
-       if (strcmp(ca->ca_name, "clock"))
+       if (strcmp(ca->ca_name, "mkclock") != 0)
                return 0;
 
        return 1;



Home | Main Index | Thread Index | Old Index