Module Name: src
Committed By: thorpej
Date: Sat Apr 3 06:54:29 UTC 2021
Modified Files:
src/sys/arch/powerpc/booke/dev [thorpej-cfargs]: pq3obio.c
src/sys/arch/x86/pci [thorpej-cfargs]: amdpcib.c amdsmn.c
src/sys/dev/audio [thorpej-cfargs]: audio.c
src/sys/dev/fdt [thorpej-cfargs]: fdtbus.c
src/sys/dev/gpio [thorpej-cfargs]: gpio.c
src/sys/dev/ic [thorpej-cfargs]: apple_smc.c
src/sys/dev/isa [thorpej-cfargs]: isa.c pcppi.c
src/sys/dev/scsipi [thorpej-cfargs]: scsiconf.c
src/sys/kern [thorpej-cfargs]: subr_autoconf.c
src/sys/sys [thorpej-cfargs]: device.h
Log Message:
config_attach_loc() -> config_attach() with CFARG_LOCATORS argument.
To generate a diff of this commit:
cvs rdiff -u -r1.5.4.2 -r1.5.4.3 src/sys/arch/powerpc/booke/dev/pq3obio.c
cvs rdiff -u -r1.3.96.1 -r1.3.96.2 src/sys/arch/x86/pci/amdpcib.c
cvs rdiff -u -r1.10.4.3 -r1.10.4.4 src/sys/arch/x86/pci/amdsmn.c
cvs rdiff -u -r1.91.2.4 -r1.91.2.5 src/sys/dev/audio/audio.c
cvs rdiff -u -r1.40.2.2 -r1.40.2.3 src/sys/dev/fdt/fdtbus.c
cvs rdiff -u -r1.64.10.6 -r1.64.10.7 src/sys/dev/gpio/gpio.c
cvs rdiff -u -r1.6.50.2 -r1.6.50.3 src/sys/dev/ic/apple_smc.c
cvs rdiff -u -r1.138.76.4 -r1.138.76.5 src/sys/dev/isa/isa.c
cvs rdiff -u -r1.45.22.3 -r1.45.22.4 src/sys/dev/isa/pcppi.c
cvs rdiff -u -r1.290.4.3 -r1.290.4.4 src/sys/dev/scsipi/scsiconf.c
cvs rdiff -u -r1.277.2.7 -r1.277.2.8 src/sys/kern/subr_autoconf.c
cvs rdiff -u -r1.167.2.5 -r1.167.2.6 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/powerpc/booke/dev/pq3obio.c
diff -u src/sys/arch/powerpc/booke/dev/pq3obio.c:1.5.4.2 src/sys/arch/powerpc/booke/dev/pq3obio.c:1.5.4.3
--- src/sys/arch/powerpc/booke/dev/pq3obio.c:1.5.4.2 Sun Mar 21 17:35:46 2021
+++ src/sys/arch/powerpc/booke/dev/pq3obio.c Sat Apr 3 06:54:28 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: pq3obio.c,v 1.5.4.2 2021/03/21 17:35:46 thorpej Exp $ */
+/* $NetBSD: pq3obio.c,v 1.5.4.3 2021/04/03 06:54:28 thorpej Exp $ */
/*-
* Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -37,7 +37,7 @@
#define LBC_PRIVATE
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pq3obio.c,v 1.5.4.2 2021/03/21 17:35:46 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pq3obio.c,v 1.5.4.3 2021/04/03 06:54:28 thorpej Exp $");
#include "locators.h"
@@ -151,7 +151,9 @@ pq3obio_search(device_t parent, cfdata_t
[OBIOCF_IRQ] = ga.ga_irq,
[OBIOCF_CS] = ga.ga_cs,
};
- config_attach_loc(parent, cf, floc, &ga, pq3obio_print);
+ config_attach(parent, cf, &ga, pq3obio_print,
+ CFARG_LOCATORS, floc,
+ CFARG_EOL);
tryagain = (cf->cf_fstate == FSTATE_STAR);
}
} while (tryagain);
Index: src/sys/arch/x86/pci/amdpcib.c
diff -u src/sys/arch/x86/pci/amdpcib.c:1.3.96.1 src/sys/arch/x86/pci/amdpcib.c:1.3.96.2
--- src/sys/arch/x86/pci/amdpcib.c:1.3.96.1 Sat Mar 20 19:33:39 2021
+++ src/sys/arch/x86/pci/amdpcib.c Sat Apr 3 06:54:28 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: amdpcib.c,v 1.3.96.1 2021/03/20 19:33:39 thorpej Exp $ */
+/* $NetBSD: amdpcib.c,v 1.3.96.2 2021/04/03 06:54:28 thorpej Exp $ */
/*
* Copyright (c) 2006 Nicolas Joly
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdpcib.c,v 1.3.96.1 2021/03/20 19:33:39 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdpcib.c,v 1.3.96.2 2021/04/03 06:54:28 thorpej Exp $");
#include <sys/systm.h>
#include <sys/device.h>
@@ -83,7 +83,9 @@ amdpcib_search(device_t parent, cfdata_t
{
if (config_match(parent, cf, aux))
- config_attach_loc(parent, cf, locs, aux, NULL);
+ config_attach(parent, cf, aux, NULL,
+ CFARG_LOCATORS, locs,
+ CFARG_EOL);
return 0;
}
Index: src/sys/arch/x86/pci/amdsmn.c
diff -u src/sys/arch/x86/pci/amdsmn.c:1.10.4.3 src/sys/arch/x86/pci/amdsmn.c:1.10.4.4
--- src/sys/arch/x86/pci/amdsmn.c:1.10.4.3 Sun Mar 28 01:03:19 2021
+++ src/sys/arch/x86/pci/amdsmn.c Sat Apr 3 06:54:28 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: amdsmn.c,v 1.10.4.3 2021/03/28 01:03:19 thorpej Exp $ */
+/* $NetBSD: amdsmn.c,v 1.10.4.4 2021/04/03 06:54:28 thorpej Exp $ */
/*-
* Copyright (c) 2017, 2019 Conrad Meyer <[email protected]>
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdsmn.c,v 1.10.4.3 2021/03/28 01:03:19 thorpej Exp $ ");
+__KERNEL_RCSID(0, "$NetBSD: amdsmn.c,v 1.10.4.4 2021/04/03 06:54:28 thorpej Exp $ ");
/*
* Driver for the AMD Family 15h (model 60+) and 17h CPU
@@ -123,7 +123,9 @@ static int
amdsmn_misc_search(device_t parent, cfdata_t cf, const int *locs, void *aux)
{
if (config_match(parent, cf, aux))
- config_attach_loc(parent, cf, locs, aux, NULL);
+ config_attach(parent, cf, aux, NULL,
+ CFARG_LOCATORS, locs,
+ CFARG_EOL);
return 0;
}
Index: src/sys/dev/audio/audio.c
diff -u src/sys/dev/audio/audio.c:1.91.2.4 src/sys/dev/audio/audio.c:1.91.2.5
--- src/sys/dev/audio/audio.c:1.91.2.4 Sun Mar 28 19:55:37 2021
+++ src/sys/dev/audio/audio.c Sat Apr 3 06:54:28 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: audio.c,v 1.91.2.4 2021/03/28 19:55:37 thorpej Exp $ */
+/* $NetBSD: audio.c,v 1.91.2.5 2021/04/03 06:54:28 thorpej Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -138,7 +138,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.91.2.4 2021/03/28 19:55:37 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.91.2.5 2021/04/03 06:54:28 thorpej Exp $");
#ifdef _KERNEL_OPT
#include "audio.h"
@@ -1404,7 +1404,9 @@ audiosearch(device_t parent, cfdata_t cf
{
if (config_match(parent, cf, aux))
- config_attach_loc(parent, cf, locs, aux, NULL);
+ config_attach(parent, cf, aux, NULL,
+ CFARG_LOCATORS,
+ CFARG_EOL);
return 0;
}
Index: src/sys/dev/fdt/fdtbus.c
diff -u src/sys/dev/fdt/fdtbus.c:1.40.2.2 src/sys/dev/fdt/fdtbus.c:1.40.2.3
--- src/sys/dev/fdt/fdtbus.c:1.40.2.2 Mon Mar 22 02:00:59 2021
+++ src/sys/dev/fdt/fdtbus.c Sat Apr 3 06:54:29 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: fdtbus.c,v 1.40.2.2 2021/03/22 02:00:59 thorpej Exp $ */
+/* $NetBSD: fdtbus.c,v 1.40.2.3 2021/04/03 06:54:29 thorpej Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <[email protected]>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdtbus.c,v 1.40.2.2 2021/03/22 02:00:59 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdtbus.c,v 1.40.2.3 2021/04/03 06:54:29 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -393,8 +393,10 @@ fdt_scan(struct fdt_softc *sc, int pass)
fdt_pre_attach(node);
if (quiet) {
- node->n_dev = config_attach_loc(node->n_bus, node->n_cf, locs,
- &faa, fdtbus_print);
+ node->n_dev = config_attach(node->n_bus, node->n_cf,
+ &faa, fdtbus_print,
+ CFARG_LOCATORS, locs,
+ CFARG_EOL);
} else {
/*
* Default pass.
Index: src/sys/dev/gpio/gpio.c
diff -u src/sys/dev/gpio/gpio.c:1.64.10.6 src/sys/dev/gpio/gpio.c:1.64.10.7
--- src/sys/dev/gpio/gpio.c:1.64.10.6 Sat Apr 3 01:57:17 2021
+++ src/sys/dev/gpio/gpio.c Sat Apr 3 06:54:29 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: gpio.c,v 1.64.10.6 2021/04/03 01:57:17 thorpej Exp $ */
+/* $NetBSD: gpio.c,v 1.64.10.7 2021/04/03 06:54:29 thorpej Exp $ */
/* $OpenBSD: gpio.c,v 1.6 2006/01/14 12:33:49 grange Exp $ */
/*
@@ -19,7 +19,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.64.10.6 2021/04/03 01:57:17 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.64.10.7 2021/04/03 06:54:29 thorpej Exp $");
/*
* General Purpose Input/Output framework.
@@ -857,8 +857,10 @@ gpio_ioctl(struct gpio_softc *sc, u_long
CFARG_LOCATORS, locs,
CFARG_EOL);
if (cf != NULL) {
- dv = config_attach_loc(sc->sc_dev, cf, locs, &ga,
- gpiobus_print);
+ dv = config_attach(sc->sc_dev, cf, &ga,
+ gpiobus_print,
+ CFARG_LOCATORS, locs,
+ CFARG_EOL);
#ifdef COMPAT_50
if (dv != NULL) {
gdev = kmem_alloc(sizeof(struct gpio_dev),
Index: src/sys/dev/ic/apple_smc.c
diff -u src/sys/dev/ic/apple_smc.c:1.6.50.2 src/sys/dev/ic/apple_smc.c:1.6.50.3
--- src/sys/dev/ic/apple_smc.c:1.6.50.2 Sun Mar 28 20:25:44 2021
+++ src/sys/dev/ic/apple_smc.c Sat Apr 3 06:54:29 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: apple_smc.c,v 1.6.50.2 2021/03/28 20:25:44 thorpej Exp $ */
+/* $NetBSD: apple_smc.c,v 1.6.50.3 2021/04/03 06:54:29 thorpej Exp $ */
/*
* Apple System Management Controller
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: apple_smc.c,v 1.6.50.2 2021/03/28 20:25:44 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: apple_smc.c,v 1.6.50.3 2021/04/03 06:54:29 thorpej Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -150,7 +150,9 @@ apple_smc_search(device_t parent, cfdata
/* Looks hunky-dory. Attach. */
asa.asa_smc = smc;
- (void)config_attach_loc(parent, cf, locators, &asa, NULL);
+ config_attach(parent, cf, &asa, NULL,
+ CFARG_LOCATORS, locators,
+ CFARG_EOL);
return 0;
}
Index: src/sys/dev/isa/isa.c
diff -u src/sys/dev/isa/isa.c:1.138.76.4 src/sys/dev/isa/isa.c:1.138.76.5
--- src/sys/dev/isa/isa.c:1.138.76.4 Sun Mar 28 20:34:44 2021
+++ src/sys/dev/isa/isa.c Sat Apr 3 06:54:29 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: isa.c,v 1.138.76.4 2021/03/28 20:34:44 thorpej Exp $ */
+/* $NetBSD: isa.c,v 1.138.76.5 2021/04/03 06:54:29 thorpej Exp $ */
/*-
* Copyright (c) 1998, 2001, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isa.c,v 1.138.76.4 2021/03/28 20:34:44 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isa.c,v 1.138.76.5 2021/04/03 06:54:29 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -484,7 +484,9 @@ isasearch(device_t parent, cfdata_t cf,
flocs[ISACF_IRQ] = ia.ia_irq[0].ir_irq;
flocs[ISACF_DRQ] = ia.ia_drq[0].ir_drq;
flocs[ISACF_DRQ2] = ia.ia_drq[1].ir_drq;
- config_attach_loc(parent, cf, flocs, &ia, isaprint);
+ config_attach(parent, cf, &ia, isaprint,
+ CFARG_LOCATORS, flocs,
+ CFARG_EOL);
tryagain = (cf->cf_fstate == FSTATE_STAR);
}
} while (tryagain);
Index: src/sys/dev/isa/pcppi.c
diff -u src/sys/dev/isa/pcppi.c:1.45.22.3 src/sys/dev/isa/pcppi.c:1.45.22.4
--- src/sys/dev/isa/pcppi.c:1.45.22.3 Sun Mar 28 20:35:57 2021
+++ src/sys/dev/isa/pcppi.c Sat Apr 3 06:54:29 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: pcppi.c,v 1.45.22.3 2021/03/28 20:35:57 thorpej Exp $ */
+/* $NetBSD: pcppi.c,v 1.45.22.4 2021/04/03 06:54:29 thorpej Exp $ */
/*
* Copyright (c) 1996 Carnegie-Mellon University.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcppi.c,v 1.45.22.3 2021/03/28 20:35:57 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcppi.c,v 1.45.22.4 2021/04/03 06:54:29 thorpej Exp $");
#include "attimer.h"
@@ -257,7 +257,9 @@ pcppisearch(device_t parent, cfdata_t cf
{
if (config_match(parent, cf, aux))
- config_attach_loc(parent, cf, locs, aux, NULL);
+ config_attach(parent, cf, aux, NULL,
+ CFARG_LOCATORS, locs,
+ CFARG_EOL);
return 0;
}
Index: src/sys/dev/scsipi/scsiconf.c
diff -u src/sys/dev/scsipi/scsiconf.c:1.290.4.3 src/sys/dev/scsipi/scsiconf.c:1.290.4.4
--- src/sys/dev/scsipi/scsiconf.c:1.290.4.3 Sun Mar 28 20:38:47 2021
+++ src/sys/dev/scsipi/scsiconf.c Sat Apr 3 06:54:29 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: scsiconf.c,v 1.290.4.3 2021/03/28 20:38:47 thorpej Exp $ */
+/* $NetBSD: scsiconf.c,v 1.290.4.4 2021/04/03 06:54:29 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.290.4.3 2021/03/28 20:38:47 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.290.4.4 2021/04/03 06:54:29 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1033,8 +1033,9 @@ scsi_probe_device(struct scsibus_softc *
* XXX need it before config_attach() returns. Must
* XXX assign it in periph driver.
*/
- config_attach_loc(sc->sc_dev, cf, locs, &sa,
- scsibusprint);
+ config_attach(sc->sc_dev, cf, &sa, scsibusprint,
+ CFARG_LOCATORS, locs,
+ CFARG_EOL);
} else {
scsibusprint(&sa, device_xname(sc->sc_dev));
aprint_normal(" not configured\n");
Index: src/sys/kern/subr_autoconf.c
diff -u src/sys/kern/subr_autoconf.c:1.277.2.7 src/sys/kern/subr_autoconf.c:1.277.2.8
--- src/sys/kern/subr_autoconf.c:1.277.2.7 Sat Apr 3 01:57:18 2021
+++ src/sys/kern/subr_autoconf.c Sat Apr 3 06:54:29 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_autoconf.c,v 1.277.2.7 2021/04/03 01:57:18 thorpej Exp $ */
+/* $NetBSD: subr_autoconf.c,v 1.277.2.8 2021/04/03 06:54:29 thorpej 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.277.2.7 2021/04/03 01:57:18 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.277.2.8 2021/04/03 06:54:29 thorpej Exp $");
#ifdef _KERNEL_OPT
#include "opt_ddb.h"
@@ -1201,7 +1201,8 @@ config_vfound(device_t parent, void *aux
CFARG_IATTR, ifattr,
CFARG_LOCATORS, locs,
CFARG_EOL)))
- return config_attach_loc(parent, cf, locs, aux, print);
+ return config_attach(parent, cf, aux, print,
+ CFARG_LOCATORS, locs);
if (print) {
if (config_do_twiddle && cold)
twiddle();
@@ -1720,15 +1721,6 @@ config_attach(device_t parent, cfdata_t
return dev;
}
-device_t
-config_attach_loc(device_t parent, cfdata_t cf, const int *locs, void *aux,
- cfprint_t print)
-{
- return config_attach(parent, cf, aux, print,
- CFARG_LOCATORS, locs,
- CFARG_EOL);
-}
-
/*
* As above, but for pseudo-devices. Pseudo-devices attached in this
* way are silently inserted into the device tree, and their children
Index: src/sys/sys/device.h
diff -u src/sys/sys/device.h:1.167.2.5 src/sys/sys/device.h:1.167.2.6
--- src/sys/sys/device.h:1.167.2.5 Sat Apr 3 01:57:19 2021
+++ src/sys/sys/device.h Sat Apr 3 06:54:29 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: device.h,v 1.167.2.5 2021/04/03 01:57:19 thorpej Exp $ */
+/* $NetBSD: device.h,v 1.167.2.6 2021/04/03 06:54:29 thorpej Exp $ */
/*
* Copyright (c) 2021 The NetBSD Foundation, Inc.
@@ -583,7 +583,6 @@ cfdata_t config_search(device_t, void *,
cfdata_t config_rootsearch(cfsubmatch_t, const char *, void *);
device_t config_found(device_t, void *, cfprint_t, cfarg_t, ...);
device_t config_rootfound(const char *, void *);
-device_t config_attach_loc(device_t, cfdata_t, const int *, void *, cfprint_t);
device_t config_attach(device_t, cfdata_t, void *, cfprint_t, cfarg_t, ...);
int config_match(device_t, cfdata_t, void *);