Module Name: src
Committed By: dyoung
Date: Fri Jan 8 00:09:45 UTC 2010
Modified Files:
src/sys/arch/i386/i386: mainbus.c
src/sys/arch/i386/pci: elan520.c gscpcib.c
src/sys/arch/x86/pci: ichlpcib.c pcib.c
src/sys/dev/acpi: acpi.c
src/sys/kern: subr_autoconf.c
src/sys/sys: device.h
Log Message:
Move all copies of ifattr_match() to sys/kern/subr_autoconf.c.
To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/arch/i386/i386/mainbus.c
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/i386/pci/elan520.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/i386/pci/gscpcib.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/x86/pci/ichlpcib.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/x86/pci/pcib.c
cvs rdiff -u -r1.140 -r1.141 src/sys/dev/acpi/acpi.c
cvs rdiff -u -r1.192 -r1.193 src/sys/kern/subr_autoconf.c
cvs rdiff -u -r1.129 -r1.130 src/sys/sys/device.h
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/i386/i386/mainbus.c
diff -u src/sys/arch/i386/i386/mainbus.c:1.87 src/sys/arch/i386/i386/mainbus.c:1.88
--- src/sys/arch/i386/i386/mainbus.c:1.87 Tue Aug 18 16:41:02 2009
+++ src/sys/arch/i386/i386/mainbus.c Fri Jan 8 00:09:44 2010
@@ -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)
Index: src/sys/arch/i386/pci/elan520.c
diff -u src/sys/arch/i386/pci/elan520.c:1.44 src/sys/arch/i386/pci/elan520.c:1.45
--- src/sys/arch/i386/pci/elan520.c:1.44 Tue Dec 1 01:08:45 2009
+++ src/sys/arch/i386/pci/elan520.c Fri Jan 8 00:09:44 2010
@@ -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)
Index: src/sys/arch/i386/pci/gscpcib.c
diff -u src/sys/arch/i386/pci/gscpcib.c:1.14 src/sys/arch/i386/pci/gscpcib.c:1.15
--- src/sys/arch/i386/pci/gscpcib.c:1.14 Tue Aug 18 19:51:45 2009
+++ src/sys/arch/i386/pci/gscpcib.c Fri Jan 8 00:09:44 2010
@@ -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 <[email protected]>
@@ -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)
{
Index: src/sys/arch/x86/pci/ichlpcib.c
diff -u src/sys/arch/x86/pci/ichlpcib.c:1.21 src/sys/arch/x86/pci/ichlpcib.c:1.22
--- src/sys/arch/x86/pci/ichlpcib.c:1.21 Sun Sep 27 18:27:01 2009
+++ src/sys/arch/x86/pci/ichlpcib.c Fri Jan 8 00:09:45 2010
@@ -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)
{
Index: src/sys/arch/x86/pci/pcib.c
diff -u src/sys/arch/x86/pci/pcib.c:1.10 src/sys/arch/x86/pci/pcib.c:1.11
--- src/sys/arch/x86/pci/pcib.c:1.10 Sun Aug 23 15:42:51 2009
+++ src/sys/arch/x86/pci/pcib.c Fri Jan 8 00:09:45 2010
@@ -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)
{
Index: src/sys/dev/acpi/acpi.c
diff -u src/sys/dev/acpi/acpi.c:1.140 src/sys/dev/acpi/acpi.c:1.141
--- src/sys/dev/acpi/acpi.c:1.140 Tue Jan 5 13:39:49 2010
+++ src/sys/dev/acpi/acpi.c Fri Jan 8 00:09:44 2010
@@ -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)
{
Index: src/sys/kern/subr_autoconf.c
diff -u src/sys/kern/subr_autoconf.c:1.192 src/sys/kern/subr_autoconf.c:1.193
--- src/sys/kern/subr_autoconf.c:1.192 Thu Jan 7 22:39:52 2010
+++ src/sys/kern/subr_autoconf.c Fri Jan 8 00:09:45 2010
@@ -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)
{
Index: src/sys/sys/device.h
diff -u src/sys/sys/device.h:1.129 src/sys/sys/device.h:1.130
--- src/sys/sys/device.h:1.129 Thu Jan 7 22:39:52 2010
+++ src/sys/sys/device.h Fri Jan 8 00:09:45 2010
@@ -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);