Source-Changes-HG archive

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

[src/trunk]: src/sys Move all copies of ifattr_match() to sys/kern/subr_autoc...



details:   https://anonhg.NetBSD.org/src/rev/d7f0ef2f1d0e
branches:  trunk
changeset: 750605:d7f0ef2f1d0e
user:      dyoung <dyoung%NetBSD.org@localhost>
date:      Fri Jan 08 00:09:44 2010 +0000

description:
Move all copies of ifattr_match() to sys/kern/subr_autoconf.c.

diffstat:

 sys/arch/i386/i386/mainbus.c |  11 ++---------
 sys/arch/i386/pci/elan520.c  |  10 ++--------
 sys/arch/i386/pci/gscpcib.c  |  11 ++---------
 sys/arch/x86/pci/ichlpcib.c  |  13 ++-----------
 sys/arch/x86/pci/pcib.c      |  11 ++---------
 sys/dev/acpi/acpi.c          |  11 ++---------
 sys/kern/subr_autoconf.c     |  10 ++++++++--
 sys/sys/device.h             |   4 +++-
 8 files changed, 23 insertions(+), 58 deletions(-)

diffs (242 lines):

diff -r 59dcc802a78d -r d7f0ef2f1d0e sys/arch/i386/i386/mainbus.c
--- a/sys/arch/i386/i386/mainbus.c      Thu Jan 07 23:35:45 2010 +0000
+++ b/sys/arch/i386/i386/mainbus.c      Fri Jan 08 00:09:44 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mainbus.c,v 1.87 2009/08/18 16:41:02 jmcneill Exp $    */
+/*     $NetBSD: mainbus.c,v 1.88 2010/01/08 00:09:44 dyoung Exp $      */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.87 2009/08/18 16:41:02 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.88 2010/01/08 00:09:44 dyoung Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -324,13 +324,6 @@
                aprint_error_dev(self, "couldn't establish power handler\n");
 }
 
-/* XXX share this with sys/arch/i386/pci/elan520.c */
-static bool
-ifattr_match(const char *snull, const char *t)
-{
-       return (snull == NULL) || strcmp(snull, t) == 0;
-}
-
 /* scan for new children */
 static int
 mainbus_rescan(device_t self, const char *ifattr, const int *locators)
diff -r 59dcc802a78d -r d7f0ef2f1d0e sys/arch/i386/pci/elan520.c
--- a/sys/arch/i386/pci/elan520.c       Thu Jan 07 23:35:45 2010 +0000
+++ b/sys/arch/i386/pci/elan520.c       Fri Jan 08 00:09:44 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: elan520.c,v 1.44 2009/12/01 01:08:45 dyoung Exp $      */
+/*     $NetBSD: elan520.c,v 1.45 2010/01/08 00:09:44 dyoung Exp $      */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: elan520.c,v 1.44 2009/12/01 01:08:45 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: elan520.c,v 1.45 2010/01/08 00:09:44 dyoung Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1424,12 +1424,6 @@
        return sc->sc_par == NULL;
 }
 
-static bool
-ifattr_match(const char *snull, const char *t)
-{
-       return (snull == NULL) || strcmp(snull, t) == 0;
-}
-
 /* scan for new children */
 static int
 elansc_rescan(device_t self, const char *ifattr, const int *locators)
diff -r 59dcc802a78d -r d7f0ef2f1d0e sys/arch/i386/pci/gscpcib.c
--- a/sys/arch/i386/pci/gscpcib.c       Thu Jan 07 23:35:45 2010 +0000
+++ b/sys/arch/i386/pci/gscpcib.c       Fri Jan 08 00:09:44 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gscpcib.c,v 1.14 2009/08/18 19:51:45 dyoung Exp $      */
+/*     $NetBSD: gscpcib.c,v 1.15 2010/01/08 00:09:44 dyoung Exp $      */
 /*     $OpenBSD: gscpcib.c,v 1.3 2004/10/05 19:02:33 grange Exp $      */
 /*
  * Copyright (c) 2004 Alexander Yurchenko <grange%openbsd.org@localhost>
@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gscpcib.c,v 1.14 2009/08/18 19:51:45 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gscpcib.c,v 1.15 2010/01/08 00:09:44 dyoung Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -82,13 +82,6 @@
                pcibchilddet(self, child);
 }
 
-/* XXX share this with sys/arch/i386/pci/elan520.c */
-static bool
-ifattr_match(const char *snull, const char *t)
-{
-       return (snull == NULL) || strcmp(snull, t) == 0;
-}
-
 int
 gscpcib_rescan(device_t self, const char *ifattr, const int *loc)
 {
diff -r 59dcc802a78d -r d7f0ef2f1d0e sys/arch/x86/pci/ichlpcib.c
--- a/sys/arch/x86/pci/ichlpcib.c       Thu Jan 07 23:35:45 2010 +0000
+++ b/sys/arch/x86/pci/ichlpcib.c       Fri Jan 08 00:09:44 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ichlpcib.c,v 1.21 2009/09/27 18:27:01 jakllsch Exp $   */
+/*     $NetBSD: ichlpcib.c,v 1.22 2010/01/08 00:09:45 dyoung Exp $     */
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ichlpcib.c,v 1.21 2009/09/27 18:27:01 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ichlpcib.c,v 1.22 2010/01/08 00:09:45 dyoung Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -347,15 +347,6 @@
        }
 }
 
-#if NHPET > 0 || NGPIO > 0
-/* XXX share this with sys/arch/i386/pci/elan520.c */
-static bool
-ifattr_match(const char *snull, const char *t)
-{
-       return (snull == NULL) || strcmp(snull, t) == 0;
-}
-#endif
-
 static int
 lpcibrescan(device_t self, const char *ifattr, const int *locators)
 {
diff -r 59dcc802a78d -r d7f0ef2f1d0e sys/arch/x86/pci/pcib.c
--- a/sys/arch/x86/pci/pcib.c   Thu Jan 07 23:35:45 2010 +0000
+++ b/sys/arch/x86/pci/pcib.c   Fri Jan 08 00:09:44 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pcib.c,v 1.10 2009/08/23 15:42:51 jmcneill Exp $       */
+/*     $NetBSD: pcib.c,v 1.11 2010/01/08 00:09:45 dyoung Exp $ */
 
 /*-
  * Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.10 2009/08/23 15:42:51 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.11 2010/01/08 00:09:45 dyoung Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -231,13 +231,6 @@
                sc->sc_isabus = NULL;
 }
 
-/* XXX share this with sys/arch/i386/pci/elan520.c */
-static bool
-ifattr_match(const char *snull, const char *t)
-{
-       return (snull == NULL) || strcmp(snull, t) == 0;
-}
-
 int
 pcibrescan(device_t self, const char *ifattr, const int *loc)
 {
diff -r 59dcc802a78d -r d7f0ef2f1d0e sys/dev/acpi/acpi.c
--- a/sys/dev/acpi/acpi.c       Thu Jan 07 23:35:45 2010 +0000
+++ b/sys/dev/acpi/acpi.c       Fri Jan 08 00:09:44 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acpi.c,v 1.140 2010/01/05 13:39:49 jruoho Exp $        */
+/*     $NetBSD: acpi.c,v 1.141 2010/01/08 00:09:44 dyoung Exp $        */
 
 /*-
  * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.140 2010/01/05 13:39:49 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.141 2010/01/08 00:09:44 dyoung Exp $");
 
 #include "opt_acpi.h"
 #include "opt_pcifixup.h"
@@ -723,13 +723,6 @@
        return 0;
 }
 
-/* XXX share this with sys/arch/i386/pci/elan520.c */
-static bool
-ifattr_match(const char *snull, const char *t)
-{
-       return (snull == NULL) || strcmp(snull, t) == 0;
-}
-
 static void
 acpi_rescan1(struct acpi_softc *sc, const char *ifattr, const int *locators)
 {
diff -r 59dcc802a78d -r d7f0ef2f1d0e sys/kern/subr_autoconf.c
--- a/sys/kern/subr_autoconf.c  Thu Jan 07 23:35:45 2010 +0000
+++ b/sys/kern/subr_autoconf.c  Fri Jan 08 00:09:44 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_autoconf.c,v 1.192 2010/01/07 22:39:52 dyoung Exp $ */
+/* $NetBSD: subr_autoconf.c,v 1.193 2010/01/08 00:09:45 dyoung Exp $ */
 
 /*
  * Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.192 2010/01/07 22:39:52 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.193 2010/01/08 00:09:45 dyoung Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -2722,6 +2722,12 @@
        config_alldevs_unlock(s);
 }
 
+bool
+ifattr_match(const char *snull, const char *t)
+{
+       return (snull == NULL) || strcmp(snull, t) == 0;
+}
+
 void
 null_childdetached(device_t self, device_t child)
 {
diff -r 59dcc802a78d -r d7f0ef2f1d0e sys/sys/device.h
--- a/sys/sys/device.h  Thu Jan 07 23:35:45 2010 +0000
+++ b/sys/sys/device.h  Fri Jan 08 00:09:44 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: device.h,v 1.129 2010/01/07 22:39:52 dyoung Exp $ */
+/* $NetBSD: device.h,v 1.130 2010/01/08 00:09:45 dyoung Exp $ */
 
 /*
  * Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -460,6 +460,8 @@
 device_t config_attach(device_t, cfdata_t, void *, cfprint_t);
 int    config_match(device_t, cfdata_t, void *);
 
+bool ifattr_match(const char *, const char *);
+
 device_t config_attach_pseudo(cfdata_t);
 
 int    config_detach(device_t, int);



Home | Main Index | Thread Index | Old Index