Source-Changes-HG archive

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

[src/trunk]: src/sys/arch When in a match routine, the cfdata we're passed al...



details:   https://anonhg.NetBSD.org/src/rev/7f1764cfe68b
branches:  trunk
changeset: 537113:7f1764cfe68b
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Sep 27 02:16:28 2002 +0000

description:
When in a match routine, the cfdata we're passed always references
our own cfdriver, so don't bother comparing the names, since they
will always match.

diffstat:

 sys/arch/dreamcast/dev/g2/g2bus.c    |  5 +----
 sys/arch/dreamcast/dev/g2/gapspci.c  |  5 +----
 sys/arch/dreamcast/dev/gdrom.c       |  4 ++--
 sys/arch/dreamcast/dev/maple/maple.c |  5 +----
 sys/arch/dreamcast/dev/pvr.c         |  7 ++-----
 sys/arch/evbarm/ifpga/pl030_rtc.c    |  6 ++----
 sys/arch/evbarm/ifpga/plcom_ifpga.c  |  6 ++----
 7 files changed, 11 insertions(+), 27 deletions(-)

diffs (143 lines):

diff -r af599a0343b0 -r 7f1764cfe68b sys/arch/dreamcast/dev/g2/g2bus.c
--- a/sys/arch/dreamcast/dev/g2/g2bus.c Fri Sep 27 02:14:38 2002 +0000
+++ b/sys/arch/dreamcast/dev/g2/g2bus.c Fri Sep 27 02:16:28 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: g2bus.c,v 1.2 2002/03/24 18:21:24 uch Exp $    */
+/*     $NetBSD: g2bus.c,v 1.3 2002/09/27 02:16:28 thorpej Exp $        */
 
 /*-
  * Copyright (c) 2001 Marcus Comstedt
@@ -56,9 +56,6 @@
 g2busmatch(struct device *parent, struct cfdata *cf, void *aux)
 {
 
-       if (strcmp("g2bus", cf->cf_driver->cd_name))
-               return (0);
-
         return (1);
 }
 
diff -r af599a0343b0 -r 7f1764cfe68b sys/arch/dreamcast/dev/g2/gapspci.c
--- a/sys/arch/dreamcast/dev/g2/gapspci.c       Fri Sep 27 02:14:38 2002 +0000
+++ b/sys/arch/dreamcast/dev/g2/gapspci.c       Fri Sep 27 02:16:28 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gapspci.c,v 1.3 2002/05/16 01:01:35 thorpej Exp $      */
+/*     $NetBSD: gapspci.c,v 1.4 2002/09/27 02:16:28 thorpej Exp $      */
 
 /*-
  * Copyright (c) 2001 Marcus Comstedt
@@ -71,9 +71,6 @@
        char idbuf[16];
        bus_space_handle_t tmp_memh;
 
-       if(strcmp("gapspci", match->cf_driver->cd_name))
-               return 0;
-
        if (bus_space_map(ga->ga_memt, 0x01001400, 0x100, 0, &tmp_memh) != 0)
                return 0;
 
diff -r af599a0343b0 -r 7f1764cfe68b sys/arch/dreamcast/dev/gdrom.c
--- a/sys/arch/dreamcast/dev/gdrom.c    Fri Sep 27 02:14:38 2002 +0000
+++ b/sys/arch/dreamcast/dev/gdrom.c    Fri Sep 27 02:16:28 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gdrom.c,v 1.10 2002/09/06 13:18:43 gehenna Exp $       */
+/*     $NetBSD: gdrom.c,v 1.11 2002/09/27 02:16:28 thorpej Exp $       */
 
 /*-
  * Copyright (c) 2001 Marcus Comstedt
@@ -367,7 +367,7 @@
        static int gdrom_matched = 0;
 
        /* Allow only once instance. */
-       if (strcmp("gdrom", cf->cf_driver->cd_name) || gdrom_matched)
+       if (gdrom_matched)
                return (0);
        gdrom_matched = 1;
 
diff -r af599a0343b0 -r 7f1764cfe68b sys/arch/dreamcast/dev/maple/maple.c
--- a/sys/arch/dreamcast/dev/maple/maple.c      Fri Sep 27 02:14:38 2002 +0000
+++ b/sys/arch/dreamcast/dev/maple/maple.c      Fri Sep 27 02:16:28 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: maple.c,v 1.14 2002/09/06 13:18:43 gehenna Exp $       */
+/*     $NetBSD: maple.c,v 1.15 2002/09/27 02:16:28 thorpej Exp $       */
 
 /*-
  * Copyright (c) 2001 Marcus Comstedt
@@ -114,9 +114,6 @@
 maplematch(struct device *parent, struct cfdata *cf, void *aux)
 {
 
-       if (strcmp("maple", cf->cf_driver->cd_name))
-               return (0);
-
        return (1);
 }
 
diff -r af599a0343b0 -r 7f1764cfe68b sys/arch/dreamcast/dev/pvr.c
--- a/sys/arch/dreamcast/dev/pvr.c      Fri Sep 27 02:14:38 2002 +0000
+++ b/sys/arch/dreamcast/dev/pvr.c      Fri Sep 27 02:16:28 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pvr.c,v 1.14 2002/09/06 13:18:43 gehenna Exp $ */
+/*     $NetBSD: pvr.c,v 1.15 2002/09/27 02:16:28 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2001 Marcus Comstedt.
@@ -65,7 +65,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: pvr.c,v 1.14 2002/09/06 13:18:43 gehenna Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pvr.c,v 1.15 2002/09/27 02:16:28 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -239,9 +239,6 @@
 pvr_match(struct device *parent, struct cfdata *match, void *aux)
 {
 
-       if (strcmp("pvr", match->cf_driver->cd_name) != 0)
-               return (0);
-
        return (1);
 }
 
diff -r af599a0343b0 -r 7f1764cfe68b sys/arch/evbarm/ifpga/pl030_rtc.c
--- a/sys/arch/evbarm/ifpga/pl030_rtc.c Fri Sep 27 02:14:38 2002 +0000
+++ b/sys/arch/evbarm/ifpga/pl030_rtc.c Fri Sep 27 02:16:28 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pl030_rtc.c,v 1.2 2001/11/23 19:36:50 thorpej Exp $ */
+/*     $NetBSD: pl030_rtc.c,v 1.3 2002/09/27 02:17:26 thorpej Exp $ */
 
 /*
  * Copyright (c) 2001 ARM Ltd
@@ -68,9 +68,7 @@
 static int
 plrtc_probe(struct device *parent, struct cfdata *cf, void *aux)
 {
-       if (strcmp(cf->cf_driver->cd_name, "plrtc") == 0)
-               return 1;
-       return 0;
+       return 1;
 }
 
 static void
diff -r af599a0343b0 -r 7f1764cfe68b sys/arch/evbarm/ifpga/plcom_ifpga.c
--- a/sys/arch/evbarm/ifpga/plcom_ifpga.c       Fri Sep 27 02:14:38 2002 +0000
+++ b/sys/arch/evbarm/ifpga/plcom_ifpga.c       Fri Sep 27 02:16:28 2002 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: plcom_ifpga.c,v 1.2 2002/01/30 03:59:41 thorpej Exp $ */
+/*      $NetBSD: plcom_ifpga.c,v 1.3 2002/09/27 02:17:26 thorpej Exp $ */
 
 /*
  * Copyright (c) 2001 ARM Ltd
@@ -62,9 +62,7 @@
 static int
 plcom_ifpga_match(struct device *parent, struct cfdata *cf, void *aux)
 {
-       if (strcmp(cf->cf_driver->cd_name, "plcom") == 0)
-               return 1;
-       return 0;
+       return 1;
 }
 
 static void



Home | Main Index | Thread Index | Old Index