summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorriastradh <riastradh@NetBSD.org>2017-10-28 04:53:54 +0000
committerriastradh <riastradh@NetBSD.org>2017-10-28 04:53:54 +0000
commit1d42e734b20ce6cfd2a44769b94a21755899e3e9 (patch)
treeec70f9cf2569188483925986705dd6cf732e3360 /sys/dev
parent8fb84e12286a40f3c69ebf5e7463c3a39f573195 (diff)
Kill some more extern struct cfdriver declarations.
Down with externs in .c!
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpi/acpi.c7
-rw-r--r--sys/dev/acpi/pckbc_acpi.c8
-rw-r--r--sys/dev/acpi/tpm_acpi.c8
-rw-r--r--sys/dev/adb/adb_bt.c8
-rw-r--r--sys/dev/adb/adb_kbd.c8
-rw-r--r--sys/dev/altmem/altmem.c7
-rw-r--r--sys/dev/apm/apm.c8
-rw-r--r--sys/dev/ata/ata.c7
-rw-r--r--sys/dev/dec/vsxxx.c8
-rw-r--r--sys/dev/dm/device-mapper.c4
-rw-r--r--sys/dev/dtv/dtv_device.c8
-rw-r--r--sys/dev/flash/flash.c8
-rw-r--r--sys/dev/gpib/ct.c8
-rw-r--r--sys/dev/gpib/mt.c8
-rw-r--r--sys/dev/gpib/ppi.c8
-rw-r--r--sys/dev/gpib/rd.c8
-rw-r--r--sys/dev/gpio/gpio.c7
-rw-r--r--sys/dev/gpio/gpioiic.c8
-rw-r--r--sys/dev/gpio/gpiolock.c6
-rw-r--r--sys/dev/gpio/gpioow.c8
-rw-r--r--sys/dev/gpio/gpiopwm.c6
-rw-r--r--sys/dev/gpio/gpiosim.c4
-rw-r--r--sys/dev/hdmicec/hdmicec.c8
-rw-r--r--sys/dev/hpc/hpcapm.c8
-rw-r--r--sys/dev/hpc/hpf1275a_tty.c7
-rw-r--r--sys/dev/i2c/at24cxx.c7
-rw-r--r--sys/dev/i2c/ds1307.c7
-rw-r--r--sys/dev/i2c/i2c.c7
-rw-r--r--sys/dev/i2c/m41st84.c8
-rw-r--r--sys/dev/i2c/m41t00.c7
-rw-r--r--sys/dev/i2c/pcf8583.c7
-rw-r--r--sys/dev/i2c/x1226.c7
-rw-r--r--sys/dev/i2o/dpti.c8
-rw-r--r--sys/dev/i2o/iop.c7
-rw-r--r--sys/dev/ic/aac.c6
-rw-r--r--sys/dev/ic/aic6360.c7
-rw-r--r--sys/dev/ic/attimer.c6
-rw-r--r--sys/dev/ic/cac.c6
-rw-r--r--sys/dev/ic/clmpcc.c7
-rw-r--r--sys/dev/ic/com.c8
-rw-r--r--sys/dev/ic/cy.c8
-rw-r--r--sys/dev/ic/dpt.c8
-rw-r--r--sys/dev/ic/icp_ioctl.c8
-rw-r--r--sys/dev/ic/joy.c8
-rw-r--r--sys/dev/ic/lpt.c8
-rw-r--r--sys/dev/ic/mb89352.c8
-rw-r--r--sys/dev/ic/mfi.c8
-rw-r--r--sys/dev/ic/midway.c11
-rw-r--r--sys/dev/ic/mlx.c7
-rw-r--r--sys/dev/ic/nvme.c8
-rw-r--r--sys/dev/ic/rrunner.c9
-rw-r--r--sys/dev/ic/tpm.c7
52 files changed, 188 insertions, 198 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c
index fd8c93be84e..5d10156ab34 100644
--- a/sys/dev/acpi/acpi.c
+++ b/sys/dev/acpi/acpi.c
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi.c,v 1.263 2017/06/01 02:45:09 chs Exp $ */
+/* $NetBSD: acpi.c,v 1.264 2017/10/28 04:53:55 riastradh Exp $ */
/*-
* Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -100,7 +100,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.263 2017/06/01 02:45:09 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.264 2017/10/28 04:53:55 riastradh Exp $");
#include "opt_acpi.h"
#include "opt_pcifixup.h"
@@ -127,6 +127,8 @@ __KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.263 2017/06/01 02:45:09 chs Exp $");
#include <machine/acpi_machdep.h>
+#include "ioconf.h"
+
#define _COMPONENT ACPI_BUS_COMPONENT
ACPI_MODULE_NAME ("acpi")
@@ -143,7 +145,6 @@ int acpi_verbose_loaded = 0;
struct acpi_softc *acpi_softc = NULL;
static uint64_t acpi_root_pointer;
extern kmutex_t acpi_interrupt_list_mtx;
-extern struct cfdriver acpi_cd;
static ACPI_HANDLE acpi_scopes[4];
ACPI_TABLE_HEADER *madt_header;
diff --git a/sys/dev/acpi/pckbc_acpi.c b/sys/dev/acpi/pckbc_acpi.c
index 481b713a781..afde85b9ddf 100644
--- a/sys/dev/acpi/pckbc_acpi.c
+++ b/sys/dev/acpi/pckbc_acpi.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pckbc_acpi.c,v 1.35 2016/10/18 22:08:30 jdolecek Exp $ */
+/* $NetBSD: pckbc_acpi.c,v 1.36 2017/10/28 04:53:55 riastradh Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pckbc_acpi.c,v 1.35 2016/10/18 22:08:30 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pckbc_acpi.c,v 1.36 2017/10/28 04:53:55 riastradh Exp $");
#include <sys/param.h>
#include <sys/callout.h>
@@ -57,6 +57,8 @@ __KERNEL_RCSID(0, "$NetBSD: pckbc_acpi.c,v 1.35 2016/10/18 22:08:30 jdolecek Exp
#include <dev/ic/i8042reg.h>
#include <dev/ic/pckbcvar.h>
+#include "ioconf.h"
+
static int pckbc_acpi_match(device_t, cfdata_t, void *);
static void pckbc_acpi_attach(device_t, device_t, void *);
@@ -72,8 +74,6 @@ struct pckbc_acpi_softc {
/* Save first port: */
static struct pckbc_acpi_softc *first;
-extern struct cfdriver pckbc_cd;
-
CFATTACH_DECL_NEW(pckbc_acpi, sizeof(struct pckbc_acpi_softc),
pckbc_acpi_match, pckbc_acpi_attach, NULL, NULL);
diff --git a/sys/dev/acpi/tpm_acpi.c b/sys/dev/acpi/tpm_acpi.c
index 3dd7392400f..c128d4f0807 100644
--- a/sys/dev/acpi/tpm_acpi.c
+++ b/sys/dev/acpi/tpm_acpi.c
@@ -1,4 +1,4 @@
-/* $NetBSD: tpm_acpi.c,v 1.4 2014/03/01 16:59:41 maxv Exp $ */
+/* $NetBSD: tpm_acpi.c,v 1.5 2017/10/28 04:53:55 riastradh Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tpm_acpi.c,v 1.4 2014/03/01 16:59:41 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tpm_acpi.c,v 1.5 2017/10/28 04:53:55 riastradh Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -69,6 +69,8 @@ __KERNEL_RCSID(0, "$NetBSD: tpm_acpi.c,v 1.4 2014/03/01 16:59:41 maxv Exp $");
#include <dev/isa/isavar.h>
+#include "ioconf.h"
+
#define _COMPONENT ACPI_RESOURCE_COMPONENT
ACPI_MODULE_NAME ("tpm_acpi")
@@ -89,8 +91,6 @@ static const char * const tpm_acpi_ids[] = {
NULL
};
-extern struct cfdriver tpm_cd;
-
static int
tpm_acpi_match(device_t parent, cfdata_t match, void *aux)
{
diff --git a/sys/dev/adb/adb_bt.c b/sys/dev/adb/adb_bt.c
index 9a395167ef9..6847fd4901c 100644
--- a/sys/dev/adb/adb_bt.c
+++ b/sys/dev/adb/adb_bt.c
@@ -1,4 +1,4 @@
-/* $NetBSD: adb_bt.c,v 1.6 2010/09/08 04:48:03 macallan Exp $ */
+/* $NetBSD: adb_bt.c,v 1.7 2017/10/28 04:53:55 riastradh Exp $ */
/*-
* Copyright (c) 2006 Michael Lorenz
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: adb_bt.c,v 1.6 2010/09/08 04:48:03 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: adb_bt.c,v 1.7 2017/10/28 04:53:55 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -41,6 +41,8 @@ __KERNEL_RCSID(0, "$NetBSD: adb_bt.c,v 1.6 2010/09/08 04:48:03 macallan Exp $");
#include <dev/adb/adbvar.h>
+#include "ioconf.h"
+
#include "opt_wsdisplay_compat.h"
#include "adbdebug.h"
@@ -76,8 +78,6 @@ struct adbbt_softc {
CFATTACH_DECL_NEW(adbbt, sizeof(struct adbbt_softc),
adbbt_match, adbbt_attach, NULL, NULL);
-extern struct cfdriver adbbt_cd;
-
static void adbbt_handler(void *, int, uint8_t *);
static int
diff --git a/sys/dev/adb/adb_kbd.c b/sys/dev/adb/adb_kbd.c
index 7c9e6f6236c..e4da25bded2 100644
--- a/sys/dev/adb/adb_kbd.c
+++ b/sys/dev/adb/adb_kbd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: adb_kbd.c,v 1.26 2015/07/29 08:45:28 christos Exp $ */
+/* $NetBSD: adb_kbd.c,v 1.27 2017/10/28 04:53:55 riastradh Exp $ */
/*
* Copyright (C) 1998 Colin Wood
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: adb_kbd.c,v 1.26 2015/07/29 08:45:28 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: adb_kbd.c,v 1.27 2017/10/28 04:53:55 riastradh Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -60,6 +60,8 @@ __KERNEL_RCSID(0, "$NetBSD: adb_kbd.c,v 1.26 2015/07/29 08:45:28 christos Exp $"
#include <dev/adb/adbvar.h>
#include <dev/adb/adb_keymap.h>
+#include "ioconf.h"
+
#include "opt_wsdisplay_compat.h"
#include "opt_adbkbd.h"
#include "adbdebug.h"
@@ -111,8 +113,6 @@ static int adbkbd_wait(struct adbkbd_softc *, int);
CFATTACH_DECL_NEW(adbkbd, sizeof(struct adbkbd_softc),
adbkbd_match, adbkbd_attach, NULL, NULL);
-extern struct cfdriver adbkbd_cd;
-
static int adbkbd_enable(void *, int);
static int adbkbd_ioctl(void *, u_long, void *, int, struct lwp *);
static void adbkbd_set_leds(void *, int);
diff --git a/sys/dev/altmem/altmem.c b/sys/dev/altmem/altmem.c
index 0ab09269dcd..a658bed71cf 100644
--- a/sys/dev/altmem/altmem.c
+++ b/sys/dev/altmem/altmem.c
@@ -1,4 +1,4 @@
-/* $NetBSD: altmem.c,v 1.5 2015/04/26 15:15:20 mlelstv Exp $ */
+/* $NetBSD: altmem.c,v 1.6 2017/10/28 04:53:55 riastradh Exp $ */
/*-
* Copyright (c) 2009 Jared D. McNeill <jmcneill@invisible.ca>
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: altmem.c,v 1.5 2015/04/26 15:15:20 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altmem.c,v 1.6 2017/10/28 04:53:55 riastradh Exp $");
#include <sys/param.h>
#include <sys/types.h>
#include <sys/device.h>
@@ -37,6 +37,8 @@ __KERNEL_RCSID(0, "$NetBSD: altmem.c,v 1.5 2015/04/26 15:15:20 mlelstv Exp $");
#include <dev/altmem/altmemvar.h>
+#include "ioconf.h"
+
struct altmem_softc {
device_t sc_dev;
@@ -87,7 +89,6 @@ static struct dkdriver altmemdkdriver = {
.d_strategy = altmemstrategy,
.d_minphys = minphys
};
-extern struct cfdriver altmem_cd;
CFATTACH_DECL_NEW(altmem, sizeof(struct altmem_softc), altmem_match,
altmem_attach, NULL, NULL);
diff --git a/sys/dev/apm/apm.c b/sys/dev/apm/apm.c
index f365fd452c3..04e5c541308 100644
--- a/sys/dev/apm/apm.c
+++ b/sys/dev/apm/apm.c
@@ -1,4 +1,4 @@
-/* $NetBSD: apm.c,v 1.32 2017/10/25 08:12:38 maya Exp $ */
+/* $NetBSD: apm.c,v 1.33 2017/10/28 04:53:54 riastradh Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: apm.c,v 1.32 2017/10/25 08:12:38 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: apm.c,v 1.33 2017/10/28 04:53:54 riastradh Exp $");
#include "opt_apm.h"
@@ -57,6 +57,8 @@ __KERNEL_RCSID(0, "$NetBSD: apm.c,v 1.32 2017/10/25 08:12:38 maya Exp $");
#include <dev/apm/apmvar.h>
+#include "ioconf.h"
+
#ifdef APMDEBUG
#define DPRINTF(f, x) do { if (apmdebug & (f)) printf x; } while (0)
@@ -105,8 +107,6 @@ static void apm_standby(struct apm_softc *);
static void apm_suspend(struct apm_softc *);
static void apm_resume(struct apm_softc *, u_int, u_int);
-extern struct cfdriver apm_cd;
-
dev_type_open(apmopen);
dev_type_close(apmclose);
dev_type_ioctl(apmioctl);
diff --git a/sys/dev/ata/ata.c b/sys/dev/ata/ata.c
index c5443e64980..d006fef6b9b 100644
--- a/sys/dev/ata/ata.c
+++ b/sys/dev/ata/ata.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ata.c,v 1.140 2017/10/20 07:06:07 jdolecek Exp $ */
+/* $NetBSD: ata.c,v 1.141 2017/10/28 04:53:54 riastradh Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.140 2017/10/20 07:06:07 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.141 2017/10/28 04:53:54 riastradh Exp $");
#include "opt_ata.h"
@@ -53,6 +53,7 @@ __KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.140 2017/10/20 07:06:07 jdolecek Exp $");
#include <dev/ata/atavar.h>
#include <dev/ic/wdcvar.h> /* for PIOBM */
+#include "ioconf.h"
#include "locators.h"
#include "atapibus.h"
@@ -121,8 +122,6 @@ const struct cdevsw atabus_cdevsw = {
.d_flag = D_OTHER
};
-extern struct cfdriver atabus_cd;
-
static void atabus_childdetached(device_t, device_t);
static int atabus_rescan(device_t, const char *, const int *);
static bool atabus_resume(device_t, const pmf_qual_t *);
diff --git a/sys/dev/dec/vsxxx.c b/sys/dev/dec/vsxxx.c
index a1d7bca0b2c..9d074efbdd7 100644
--- a/sys/dev/dec/vsxxx.c
+++ b/sys/dev/dec/vsxxx.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vsxxx.c,v 1.11 2009/03/14 21:04:19 dsl Exp $ */
+/* $NetBSD: vsxxx.c,v 1.12 2017/10/28 04:53:54 riastradh Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vsxxx.c,v 1.11 2009/03/14 21:04:19 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vsxxx.c,v 1.12 2017/10/28 04:53:54 riastradh Exp $");
/*
* Common machinary for VSXXX mice and tablet
@@ -45,6 +45,8 @@ __KERNEL_RCSID(0, "$NetBSD: vsxxx.c,v 1.11 2009/03/14 21:04:19 dsl Exp $");
#include <dev/dec/vsxxxvar.h>
+#include "ioconf.h"
+
/*
* XXX XXX XXX
*
@@ -73,8 +75,6 @@ __KERNEL_RCSID(0, "$NetBSD: vsxxx.c,v 1.11 2009/03/14 21:04:19 dsl Exp $");
#define VS_MOUSE 0x2
#define VS_TABLET 0x4
-extern struct cfdriver vsms_cd;
-
static int vsxxx_enable(void *);
static int vsxxx_ioctl(void *, u_long, void *, int, struct proc *);
static void vsxxx_disable(void *);
diff --git a/sys/dev/dm/device-mapper.c b/sys/dev/dm/device-mapper.c
index 6eea060412d..0b23b483cc9 100644
--- a/sys/dev/dm/device-mapper.c
+++ b/sys/dev/dm/device-mapper.c
@@ -1,4 +1,4 @@
-/* $NetBSD: device-mapper.c,v 1.38 2016/07/11 11:31:50 msaitoh Exp $ */
+/* $NetBSD: device-mapper.c,v 1.39 2017/10/28 04:53:55 riastradh Exp $ */
/*
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -111,8 +111,6 @@ CFATTACH_DECL3_NEW(dm, 0,
dm_match, dm_attach, dm_detach, NULL, NULL, NULL,
DVF_DETACH_SHUTDOWN);
-extern struct cfdriver dm_cd;
-
extern uint32_t dm_dev_counter;
/*
diff --git a/sys/dev/dtv/dtv_device.c b/sys/dev/dtv/dtv_device.c
index 75f94adaea0..f7af87bd1b0 100644
--- a/sys/dev/dtv/dtv_device.c
+++ b/sys/dev/dtv/dtv_device.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dtv_device.c,v 1.11 2014/08/09 13:34:10 jmcneill Exp $ */
+/* $NetBSD: dtv_device.c,v 1.12 2017/10/28 04:53:55 riastradh Exp $ */
/*-
* Copyright (c) 2011 Jared D. McNeill <jmcneill@invisible.ca>
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dtv_device.c,v 1.11 2014/08/09 13:34:10 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dtv_device.c,v 1.12 2017/10/28 04:53:55 riastradh Exp $");
#include <sys/types.h>
#include <sys/conf.h>
@@ -45,6 +45,8 @@ __KERNEL_RCSID(0, "$NetBSD: dtv_device.c,v 1.11 2014/08/09 13:34:10 jmcneill Exp
#include <dev/dtv/dtvvar.h>
+#include "ioconf.h"
+
MODULE(MODULE_CLASS_DRIVER, dtv, NULL);
static dev_type_open(dtvopen);
@@ -80,8 +82,6 @@ CFATTACH_DECL_NEW(dtv,
NULL
);
-extern struct cfdriver dtv_cd;
-
static int
dtv_match(device_t parent, cfdata_t cfdata, void *aa)
{
diff --git a/sys/dev/flash/flash.c b/sys/dev/flash/flash.c
index 58df6913cc3..35c05ff6dc0 100644
--- a/sys/dev/flash/flash.c
+++ b/sys/dev/flash/flash.c
@@ -1,4 +1,4 @@
-/* $NetBSD: flash.c,v 1.12 2014/07/25 08:10:36 dholland Exp $ */
+/* $NetBSD: flash.c,v 1.13 2017/10/28 04:53:55 riastradh Exp $ */
/*-
* Copyright (c) 2011 Department of Software Engineering,
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: flash.c,v 1.12 2014/07/25 08:10:36 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: flash.c,v 1.13 2017/10/28 04:53:55 riastradh Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -58,6 +58,8 @@ __KERNEL_RCSID(0, "$NetBSD: flash.c,v 1.12 2014/07/25 08:10:36 dholland Exp $");
#include <sys/malloc.h>
#include <sys/reboot.h>
+#include "ioconf.h"
+
#include <sys/flashio.h>
#include "flash.h"
@@ -65,8 +67,6 @@ __KERNEL_RCSID(0, "$NetBSD: flash.c,v 1.12 2014/07/25 08:10:36 dholland Exp $");
int flashdebug = FLASH_DEBUG;
#endif
-extern struct cfdriver flash_cd;
-
dev_type_open(flashopen);
dev_type_close(flashclose);
dev_type_read(flashread);
diff --git a/sys/dev/gpib/ct.c b/sys/dev/gpib/ct.c
index 187eeea8985..558d5b6d29f 100644
--- a/sys/dev/gpib/ct.c
+++ b/sys/dev/gpib/ct.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ct.c,v 1.28 2016/07/11 11:31:50 msaitoh Exp $ */
+/* $NetBSD: ct.c,v 1.29 2017/10/28 04:53:56 riastradh Exp $ */
/*-
* Copyright (c) 1996-2003 The NetBSD Foundation, Inc.
@@ -82,7 +82,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ct.c,v 1.28 2016/07/11 11:31:50 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ct.c,v 1.29 2017/10/28 04:53:56 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -100,6 +100,8 @@ __KERNEL_RCSID(0, "$NetBSD: ct.c,v 1.28 2016/07/11 11:31:50 msaitoh Exp $");
#include <dev/gpib/gpibvar.h>
#include <dev/gpib/cs80busvar.h>
+#include "ioconf.h"
+
/* number of eof marks to remember */
#define EOFS 128
@@ -206,8 +208,6 @@ const struct cdevsw ct_cdevsw = {
.d_flag = D_TAPE
};
-extern struct cfdriver ct_cd;
-
struct ctinfo {
short hwid;
short punit;
diff --git a/sys/dev/gpib/mt.c b/sys/dev/gpib/mt.c
index 72640314418..6037e71c2f6 100644
--- a/sys/dev/gpib/mt.c
+++ b/sys/dev/gpib/mt.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mt.c,v 1.30 2016/07/14 04:00:45 msaitoh Exp $ */
+/* $NetBSD: mt.c,v 1.31 2017/10/28 04:53:56 riastradh Exp $ */
/*-
* Copyright (c) 1996-2003 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mt.c,v 1.30 2016/07/14 04:00:45 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mt.c,v 1.31 2017/10/28 04:53:56 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -97,6 +97,8 @@ __KERNEL_RCSID(0, "$NetBSD: mt.c,v 1.30 2016/07/14 04:00:45 msaitoh Exp $");
#include <dev/gpib/mtreg.h>
+#include "ioconf.h"
+
#ifdef DEBUG
int mtdebug = 0;
#define MDB_ANY 0xff
@@ -187,8 +189,6 @@ const struct cdevsw mt_cdevsw = {
};
-extern struct cfdriver mt_cd;
-
struct mtinfo {
u_short hwid;
const char *desc;
diff --git a/sys/dev/gpib/ppi.c b/sys/dev/gpib/ppi.c
index e0ce06f2c79..a1e4c51bceb 100644
--- a/sys/dev/gpib/ppi.c
+++ b/sys/dev/gpib/ppi.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ppi.c,v 1.22 2014/07/25 08:10:36 dholland Exp $ */
+/* $NetBSD: ppi.c,v 1.23 2017/10/28 04:53:56 riastradh Exp $ */
/*-
* Copyright (c) 1996-2003 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ppi.c,v 1.22 2014/07/25 08:10:36 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ppi.c,v 1.23 2017/10/28 04:53:56 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -80,6 +80,8 @@ __KERNEL_RCSID(0, "$NetBSD: ppi.c,v 1.22 2014/07/25 08:10:36 dholland Exp $");
#include <dev/gpib/ppiio.h>
+#include "ioconf.h"
+
struct ppi_softc {
device_t sc_dev;
gpib_chipset_tag_t sc_ic;
@@ -109,8 +111,6 @@ void ppiattach(device_t, device_t, void *);
CFATTACH_DECL_NEW(ppi, sizeof(struct ppi_softc),
ppimatch, ppiattach, NULL, NULL);
-extern struct cfdriver ppi_cd;
-
void ppicallback(void *, int);
void ppistart(void *);
diff --git a/sys/dev/gpib/rd.c b/sys/dev/gpib/rd.c
index 54b0dff0641..fda1587d099 100644
--- a/sys/dev/gpib/rd.c
+++ b/sys/dev/gpib/rd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rd.c,v 1.41 2016/07/11 11:31:50 msaitoh Exp $ */
+/* $NetBSD: rd.c,v 1.42 2017/10/28 04:53:56 riastradh Exp $ */
/*-
* Copyright (c) 1996-2003 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.41 2016/07/11 11:31:50 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.42 2017/10/28 04:53:56 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -96,6 +96,8 @@ __KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.41 2016/07/11 11:31:50 msaitoh Exp $");
#include <dev/gpib/rdreg.h>
+#include "ioconf.h"
+
#ifdef DEBUG
int rddebug = 0xff;
#define RDB_FOLLOW 0x01
@@ -280,8 +282,6 @@ const struct cdevsw rd_cdevsw = {
.d_flag = D_DISK
};
-extern struct cfdriver rd_cd;
-
int
rdlookup(int id, int slave, int punit)
{
diff --git a/sys/dev/gpio/gpio.c b/sys/dev/gpio/gpio.c
index e7535968205..12c7ca947e2 100644
--- a/sys/dev/gpio/gpio.c
+++ b/sys/dev/gpio/gpio.c
@@ -1,4 +1,4 @@
-/* $NetBSD: gpio.c,v 1.59 2017/07/06 10:43:06 jmcneill Exp $ */
+/* $NetBSD: gpio.c,v 1.60 2017/10/28 04:53:56 riastradh 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.59 2017/07/06 10:43:06 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.60 2017/10/28 04:53:56 riastradh Exp $");
/*
* General Purpose Input/Output framework.
@@ -43,6 +43,7 @@ __KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.59 2017/07/06 10:43:06 jmcneill Exp $");
#include <sys/module.h>
#include <dev/gpio/gpiovar.h>
+#include "ioconf.h"
#include "locators.h"
#ifdef GPIO_DEBUG
@@ -114,8 +115,6 @@ const struct cdevsw gpio_cdevsw = {
.d_flag = D_OTHER | D_MPSAFE
};
-extern struct cfdriver gpio_cd;
-
static int
gpio_match(device_t parent, cfdata_t cf, void *aux)
{
diff --git a/sys/dev/gpio/gpioiic.c b/sys/dev/gpio/gpioiic.c
index 06465629aa3..0e676bd994a 100644
--- a/sys/dev/gpio/gpioiic.c
+++ b/sys/dev/gpio/gpioiic.c
@@ -1,4 +1,4 @@
-/* $NetBSD: gpioiic.c,v 1.7 2015/09/01 19:25:32 phx Exp $ */
+/* $NetBSD: gpioiic.c,v 1.8 2017/10/28 04:53:56 riastradh Exp $ */
/* $OpenBSD: gpioiic.c,v 1.8 2008/11/24 12:12:12 mbalmer Exp $ */
/*
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gpioiic.c,v 1.7 2015/09/01 19:25:32 phx Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gpioiic.c,v 1.8 2017/10/28 04:53:56 riastradh Exp $");
/*
* I2C bus bit-banging through GPIO pins.
@@ -36,6 +36,8 @@ __KERNEL_RCSID(0, "$NetBSD: gpioiic.c,v 1.7 2015/09/01 19:25:32 phx Exp $");
#include <dev/i2c/i2cvar.h>
#include <dev/i2c/i2c_bitbang.h>
+#include "ioconf.h"
+
#define GPIOIIC_PIN_SDA 0
#define GPIOIIC_PIN_SCL 1
#define GPIOIIC_NPINS 2
@@ -80,8 +82,6 @@ uint32_t gpioiic_bb_read_bits(void *);
CFATTACH_DECL_NEW(gpioiic, sizeof(struct gpioiic_softc),
gpioiic_match, gpioiic_attach, gpioiic_detach, NULL);
-extern struct cfdriver gpioiic_cd;
-
static const struct i2c_bitbang_ops gpioiic_bbops = {
gpioiic_bb_set_bits,
gpioiic_bb_set_dir,
diff --git a/sys/dev/gpio/gpiolock.c b/sys/dev/gpio/gpiolock.c
index 94d17714e4f..ba839208c70 100644
--- a/sys/dev/gpio/gpiolock.c
+++ b/sys/dev/gpio/gpiolock.c
@@ -1,4 +1,4 @@
-/* $NetBSD: gpiolock.c,v 1.4 2017/01/20 12:25:07 maya Exp $ */
+/* $NetBSD: gpiolock.c,v 1.5 2017/10/28 04:53:56 riastradh Exp $ */
/*
* Copyright (c) 2009 Marc Balmer <marc@msys.ch>
@@ -38,6 +38,8 @@
#include <dev/gpio/gpiovar.h>
#include <dev/keylock.h>
+#include "ioconf.h"
+
#define GPIOLOCK_MAXPINS 4
#define GPIOLOCK_MINPINS 2
@@ -60,8 +62,6 @@ int gpiolock_position(void *);
CFATTACH_DECL_NEW(gpiolock, sizeof(struct gpiolock_softc),
gpiolock_match, gpiolock_attach, gpiolock_detach, gpiolock_activate);
-extern struct cfdriver gpiolock_cd;
-
int
gpiolock_match(device_t parent, cfdata_t cf,
void *aux)
diff --git a/sys/dev/gpio/gpioow.c b/sys/dev/gpio/gpioow.c
index 91e6d73b03e..130266eff01 100644
--- a/sys/dev/gpio/gpioow.c
+++ b/sys/dev/gpio/gpioow.c
@@ -1,4 +1,4 @@
-/* $NetBSD: gpioow.c,v 1.14 2011/09/07 07:43:05 mbalmer Exp $ */
+/* $NetBSD: gpioow.c,v 1.15 2017/10/28 04:53:56 riastradh Exp $ */
/* $OpenBSD: gpioow.c,v 1.1 2006/03/04 16:27:03 grange Exp $ */
/*
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gpioow.c,v 1.14 2011/09/07 07:43:05 mbalmer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gpioow.c,v 1.15 2017/10/28 04:53:56 riastradh Exp $");
/*
* 1-Wire bus bit-banging through GPIO pin.
@@ -34,6 +34,8 @@ __KERNEL_RCSID(0, "$NetBSD: gpioow.c,v 1.14 2011/09/07 07:43:05 mbalmer Exp $");
#include <dev/onewire/onewirevar.h>
+#include "ioconf.h"
+
#define GPIOOW_NPINS 1
#define GPIOOW_PIN_DATA 0
@@ -65,8 +67,6 @@ void gpioow_bb_set(void *, int);
CFATTACH_DECL_NEW(gpioow, sizeof(struct gpioow_softc),
gpioow_match, gpioow_attach, gpioow_detach, gpioow_activate);
-extern struct cfdriver gpioow_cd;
-
static const struct onewire_bbops gpioow_bbops = {
gpioow_bb_rx,
gpioow_bb_tx,
diff --git a/sys/dev/gpio/gpiopwm.c b/sys/dev/gpio/gpiopwm.c
index d9b9c7c7e0f..b6d4e6ecfe6 100644
--- a/sys/dev/gpio/gpiopwm.c
+++ b/sys/dev/gpio/gpiopwm.c
@@ -1,4 +1,4 @@
-/* $NetBSD: gpiopwm.c,v 1.6 2017/01/20 12:25:07 maya Exp $ */
+/* $NetBSD: gpiopwm.c,v 1.7 2017/10/28 04:53:56 riastradh Exp $ */
/*
* Copyright (c) 2011 Marc Balmer <marc@msys.ch>
@@ -36,6 +36,8 @@
#include <dev/gpio/gpiovar.h>
+#include "ioconf.h"
+
#define GPIOPWM_NPINS 1
struct gpiopwm_softc {
@@ -63,8 +65,6 @@ static void gpiopwm_pulse(void *);
CFATTACH_DECL_NEW(gpiopwm, sizeof(struct gpiopwm_softc),
gpiopwm_match, gpiopwm_attach, gpiopwm_detach, gpiopwm_activate);
-extern struct cfdriver gpiopwm_cd;
-
int
gpiopwm_match(device_t parent, cfdata_t cf,
void *aux)
diff --git a/sys/dev/gpio/gpiosim.c b/sys/dev/gpio/gpiosim.c
index 643fb1f5f96..90fbb35442a 100644
--- a/sys/dev/gpio/gpiosim.c
+++ b/sys/dev/gpio/gpiosim.c
@@ -1,4 +1,4 @@
-/* $NetBSD: gpiosim.c,v 1.20 2017/01/20 12:25:07 maya Exp $ */
+/* $NetBSD: gpiosim.c,v 1.21 2017/10/28 04:53:56 riastradh Exp $ */
/* $OpenBSD: gpiosim.c,v 1.1 2008/11/23 18:46:49 mbalmer Exp $ */
/*
@@ -57,8 +57,6 @@ static void gpiosim_pin_ctl(void *, int, int);
CFATTACH_DECL_NEW(gpiosim, sizeof(struct gpiosim_softc), gpiosim_match,
gpiosim_attach, gpiosim_detach, NULL);
-extern struct cfdriver gpiosim_cd;
-
static int
gpiosim_match(device_t parent, cfdata_t match, void *aux)
{
diff --git a/sys/dev/hdmicec/hdmicec.c b/sys/dev/hdmicec/hdmicec.c
index 5f92f77baa5..46fa8e76d67 100644
--- a/sys/dev/hdmicec/hdmicec.c
+++ b/sys/dev/hdmicec/hdmicec.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hdmicec.c,v 1.1 2015/08/01 21:19:24 jmcneill Exp $ */
+/* $NetBSD: hdmicec.c,v 1.2 2017/10/28 04:53:56 riastradh Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <jmcneill@invisible.ca>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hdmicec.c,v 1.1 2015/08/01 21:19:24 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hdmicec.c,v 1.2 2017/10/28 04:53:56 riastradh Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -40,6 +40,8 @@ __KERNEL_RCSID(0, "$NetBSD: hdmicec.c,v 1.1 2015/08/01 21:19:24 jmcneill Exp $")
#include <dev/hdmicec/hdmicec_if.h>
#include <dev/hdmicec/hdmicecio.h>
+#include "ioconf.h"
+
#define CEC_MAX_FRAMESIZE 16
struct hdmicec_softc {
@@ -75,8 +77,6 @@ const struct cdevsw hdmicec_cdevsw = {
.d_flag = D_MPSAFE
};
-extern struct cfdriver hdmicec_cd;
-
CFATTACH_DECL_NEW(hdmicec, sizeof(struct hdmicec_softc), hdmicec_match,
hdmicec_attach, NULL, NULL);
diff --git a/sys/dev/hpc/hpcapm.c b/sys/dev/hpc/hpcapm.c
index 9749e3a1cfc..9ab4cfc9909 100644
--- a/sys/dev/hpc/hpcapm.c
+++ b/sys/dev/hpc/hpcapm.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hpcapm.c,v 1.21 2017/06/25 12:21:00 maxv Exp $ */
+/* $NetBSD: hpcapm.c,v 1.22 2017/10/28 04:53:56 riastradh Exp $ */
/*
* Copyright (c) 2000 Takemura Shin
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hpcapm.c,v 1.21 2017/06/25 12:21:00 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hpcapm.c,v 1.22 2017/10/28 04:53:56 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_hpcapm.h"
@@ -48,6 +48,8 @@ __KERNEL_RCSID(0, "$NetBSD: hpcapm.c,v 1.21 2017/06/25 12:21:00 maxv Exp $");
#include <machine/platid.h>
#include <machine/platid_mask.h>
+#include "ioconf.h"
+
#ifdef HPCAPMDEBUG
#ifndef HPCAPMDEBUG_CONF
#define HPCAPMDEBUG_CONF 1
@@ -102,8 +104,6 @@ struct apm_accessops hpcapm_accessops = {
hpcapm_get_capabilities,
};
-extern struct cfdriver hpcapm_cd;
-
static int
hpcapm_match(device_t parent, cfdata_t cf, void *aux)
{
diff --git a/sys/dev/hpc/hpf1275a_tty.c b/sys/dev/hpc/hpf1275a_tty.c
index b1a777409ac..0cba7e6b84c 100644
--- a/sys/dev/hpc/hpf1275a_tty.c
+++ b/sys/dev/hpc/hpf1275a_tty.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hpf1275a_tty.c,v 1.28 2017/08/02 00:58:18 uwe Exp $ */
+/* $NetBSD: hpf1275a_tty.c,v 1.29 2017/10/28 04:53:56 riastradh Exp $ */
/*
* Copyright (c) 2004 Valeriy E. Ushakov
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hpf1275a_tty.c,v 1.28 2017/08/02 00:58:18 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hpf1275a_tty.c,v 1.29 2017/10/28 04:53:56 riastradh Exp $");
#include "opt_wsdisplay_compat.h"
@@ -52,8 +52,7 @@ __KERNEL_RCSID(0, "$NetBSD: hpf1275a_tty.c,v 1.28 2017/08/02 00:58:18 uwe Exp $"
#include <dev/hpc/pckbd_encode.h>
#endif
-
-extern struct cfdriver hpf1275a_cd;
+#include "ioconf.h"
struct hpf1275a_softc {
device_t sc_dev;
diff --git a/sys/dev/i2c/at24cxx.c b/sys/dev/i2c/at24cxx.c
index aa59a5a1f56..fd54d6ec117 100644
--- a/sys/dev/i2c/at24cxx.c
+++ b/sys/dev/i2c/at24cxx.c
@@ -1,4 +1,4 @@
-/* $NetBSD: at24cxx.c,v 1.24 2017/10/21 03:17:09 jmcneill Exp $ */
+/* $NetBSD: at24cxx.c,v 1.25 2017/10/28 04:53:55 riastradh Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: at24cxx.c,v 1.24 2017/10/21 03:17:09 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: at24cxx.c,v 1.25 2017/10/28 04:53:55 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -53,6 +53,8 @@ __KERNEL_RCSID(0, "$NetBSD: at24cxx.c,v 1.24 2017/10/21 03:17:09 jmcneill Exp $"
#include <dev/i2c/i2cvar.h>
#include <dev/i2c/at24cxxvar.h>
+#include "ioconf.h"
+
/*
* AT24Cxx EEPROM I2C address:
* 101 0xxx
@@ -86,7 +88,6 @@ static void seeprom_attach(device_t, device_t, void *);
CFATTACH_DECL_NEW(seeprom, sizeof(struct seeprom_softc),
seeprom_match, seeprom_attach, NULL, NULL);
-extern struct cfdriver seeprom_cd;
dev_type_open(seeprom_open);
dev_type_close(seeprom_close);
diff --git a/sys/dev/i2c/ds1307.c b/sys/dev/i2c/ds1307.c
index 67c05c05d1d..5ece041ffa7 100644
--- a/sys/dev/i2c/ds1307.c
+++ b/sys/dev/i2c/ds1307.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ds1307.c,v 1.24 2016/10/18 18:54:54 aymeric Exp $ */
+/* $NetBSD: ds1307.c,v 1.25 2017/10/28 04:53:55 riastradh Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ds1307.c,v 1.24 2016/10/18 18:54:54 aymeric Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ds1307.c,v 1.25 2017/10/28 04:53:55 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -53,6 +53,8 @@ __KERNEL_RCSID(0, "$NetBSD: ds1307.c,v 1.24 2016/10/18 18:54:54 aymeric Exp $");
#include <dev/i2c/ds1307reg.h>
#include <dev/sysmon/sysmonvar.h>
+#include "ioconf.h"
+
struct dsrtc_model {
uint16_t dm_model;
uint8_t dm_ch_reg;
@@ -150,7 +152,6 @@ static int dsrtc_match(device_t, cfdata_t, void *);
CFATTACH_DECL_NEW(dsrtc, sizeof(struct dsrtc_softc),
dsrtc_match, dsrtc_attach, NULL, NULL);
-extern struct cfdriver dsrtc_cd;
dev_type_open(dsrtc_open);
dev_type_close(dsrtc_close);
diff --git a/sys/dev/i2c/i2c.c b/sys/dev/i2c/i2c.c
index a666d5abf76..316eb68c346 100644
--- a/sys/dev/i2c/i2c.c
+++ b/sys/dev/i2c/i2c.c
@@ -1,4 +1,4 @@
-/* $NetBSD: i2c.c,v 1.55 2017/06/01 02:45:10 chs Exp $ */
+/* $NetBSD: i2c.c,v 1.56 2017/10/28 04:53:55 riastradh Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
#endif
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.55 2017/06/01 02:45:10 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.56 2017/10/28 04:53:55 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -59,6 +59,7 @@ __KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.55 2017/06/01 02:45:10 chs Exp $");
#include <dev/i2c/i2cvar.h>
+#include "ioconf.h"
#include "locators.h"
#ifndef I2C_MAX_ADDR
@@ -97,8 +98,6 @@ const struct cdevsw iic_cdevsw = {
.d_flag = D_OTHER
};
-extern struct cfdriver iic_cd;
-
static void iic_smbus_intr_thread(void *);
static void iic_fill_compat(struct i2c_attach_args*, const char*,
size_t, char **);
diff --git a/sys/dev/i2c/m41st84.c b/sys/dev/i2c/m41st84.c
index 00e833d445d..34a1c1ee14b 100644
--- a/sys/dev/i2c/m41st84.c
+++ b/sys/dev/i2c/m41st84.c
@@ -1,4 +1,4 @@
-/* $NetBSD: m41st84.c,v 1.22 2014/11/20 16:34:26 christos Exp $ */
+/* $NetBSD: m41st84.c,v 1.23 2017/10/28 04:53:55 riastradh Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: m41st84.c,v 1.22 2014/11/20 16:34:26 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: m41st84.c,v 1.23 2017/10/28 04:53:55 riastradh Exp $");
#include "opt_strtc.h"
@@ -55,6 +55,8 @@ __KERNEL_RCSID(0, "$NetBSD: m41st84.c,v 1.22 2014/11/20 16:34:26 christos Exp $"
#include <dev/i2c/m41st84reg.h>
#include <dev/i2c/m41st84var.h>
+#include "ioconf.h"
+
struct strtc_softc {
device_t sc_dev;
i2c_tag_t sc_tag;
@@ -70,8 +72,6 @@ CFATTACH_DECL_NEW(strtc, sizeof(struct strtc_softc),
strtc_match, strtc_attach, NULL, NULL);
#ifndef STRTC_NO_USERRAM
-extern struct cfdriver strtc_cd;
-
dev_type_open(strtc_open);
dev_type_close(strtc_close);
dev_type_read(strtc_read);
diff --git a/sys/dev/i2c/m41t00.c b/sys/dev/i2c/m41t00.c
index 7eb41e56653..ef80f4ed17e 100644
--- a/sys/dev/i2c/m41t00.c
+++ b/sys/dev/i2c/m41t00.c
@@ -1,4 +1,4 @@
-/* $NetBSD: m41t00.c,v 1.19 2014/11/20 16:34:26 christos Exp $ */
+/* $NetBSD: m41t00.c,v 1.20 2017/10/28 04:53:55 riastradh Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: m41t00.c,v 1.19 2014/11/20 16:34:26 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: m41t00.c,v 1.20 2017/10/28 04:53:55 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -55,6 +55,8 @@ __KERNEL_RCSID(0, "$NetBSD: m41t00.c,v 1.19 2014/11/20 16:34:26 christos Exp $")
#include <dev/i2c/i2cvar.h>
#include <dev/i2c/m41t00reg.h>
+#include "ioconf.h"
+
struct m41t00_softc {
device_t sc_dev;
i2c_tag_t sc_tag;
@@ -68,7 +70,6 @@ static void m41t00_attach(device_t, device_t, void *);
CFATTACH_DECL_NEW(m41trtc, sizeof(struct m41t00_softc),
m41t00_match, m41t00_attach, NULL, NULL);
-extern struct cfdriver m41trtc_cd;
dev_type_open(m41t00_open);
dev_type_close(m41t00_close);
diff --git a/sys/dev/i2c/pcf8583.c b/sys/dev/i2c/pcf8583.c
index 2749e842aac..79edd6f60b0 100644
--- a/sys/dev/i2c/pcf8583.c
+++ b/sys/dev/i2c/pcf8583.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pcf8583.c,v 1.16 2014/11/20 16:34:26 christos Exp $ */
+/* $NetBSD: pcf8583.c,v 1.17 2017/10/28 04:53:55 riastradh Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcf8583.c,v 1.16 2014/11/20 16:34:26 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcf8583.c,v 1.17 2017/10/28 04:53:55 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -60,6 +60,8 @@ __KERNEL_RCSID(0, "$NetBSD: pcf8583.c,v 1.16 2014/11/20 16:34:26 christos Exp $"
#include <dev/i2c/pcf8583reg.h>
#include <dev/i2c/pcf8583var.h>
+#include "ioconf.h"
+
struct pcfrtc_softc {
device_t sc_dev;
i2c_tag_t sc_tag;
@@ -73,7 +75,6 @@ static void pcfrtc_attach(device_t, device_t, void *);
CFATTACH_DECL_NEW(pcfrtc, sizeof(struct pcfrtc_softc),
pcfrtc_match, pcfrtc_attach, NULL, NULL);
-extern struct cfdriver pcfrtc_cd;
dev_type_open(pcfrtc_open);
dev_type_close(pcfrtc_close);
diff --git a/sys/dev/i2c/x1226.c b/sys/dev/i2c/x1226.c
index 1d3a90dc74e..3808b8d1387 100644
--- a/sys/dev/i2c/x1226.c
+++ b/sys/dev/i2c/x1226.c
@@ -1,4 +1,4 @@
-/* $NetBSD: x1226.c,v 1.19 2014/11/20 16:34:26 christos Exp $ */
+/* $NetBSD: x1226.c,v 1.20 2017/10/28 04:53:55 riastradh Exp $ */
/*
* Copyright (c) 2003 Shigeyuki Fukushima.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: x1226.c,v 1.19 2014/11/20 16:34:26 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x1226.c,v 1.20 2017/10/28 04:53:55 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -52,6 +52,8 @@ __KERNEL_RCSID(0, "$NetBSD: x1226.c,v 1.19 2014/11/20 16:34:26 christos Exp $");
#include <dev/i2c/i2cvar.h>
#include <dev/i2c/x1226reg.h>
+#include "ioconf.h"
+
struct xrtc_softc {
device_t sc_dev;
i2c_tag_t sc_tag;
@@ -65,7 +67,6 @@ static int xrtc_match(device_t, cfdata_t, void *);
CFATTACH_DECL_NEW(xrtc, sizeof(struct xrtc_softc),
xrtc_match, xrtc_attach, NULL, NULL);
-extern struct cfdriver xrtc_cd;
dev_type_open(xrtc_open);
dev_type_close(xrtc_close);
diff --git a/sys/dev/i2o/dpti.c b/sys/dev/i2o/dpti.c
index 4ed1103aa9e..ac99654fb50 100644
--- a/sys/dev/i2o/dpti.c
+++ b/sys/dev/i2o/dpti.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dpti.c,v 1.48 2014/07/25 08:10:37 dholland Exp $ */
+/* $NetBSD: dpti.c,v 1.49 2017/10/28 04:53:55 riastradh Exp $ */
/*-
* Copyright (c) 2001, 2007 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dpti.c,v 1.48 2014/07/25 08:10:37 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dpti.c,v 1.49 2017/10/28 04:53:55 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -83,6 +83,8 @@ __KERNEL_RCSID(0, "$NetBSD: dpti.c,v 1.48 2014/07/25 08:10:37 dholland Exp $");
#include <dev/i2o/iopvar.h>
#include <dev/i2o/dptivar.h>
+#include "ioconf.h"
+
#ifdef I2ODEBUG
#define DPRINTF(x) printf x
#else
@@ -151,8 +153,6 @@ const struct cdevsw dpti_cdevsw = {
.d_flag = D_OTHER,
};
-extern struct cfdriver dpti_cd;
-
CFATTACH_DECL_NEW(dpti, sizeof(struct dpti_softc),
dpti_match, dpti_attach, NULL, NULL);
diff --git a/sys/dev/i2o/iop.c b/sys/dev/i2o/iop.c
index e431d8185af..66b906d824f 100644
--- a/sys/dev/i2o/iop.c
+++ b/sys/dev/i2o/iop.c
@@ -1,4 +1,4 @@
-/* $NetBSD: iop.c,v 1.87 2015/08/16 19:21:33 msaitoh Exp $ */
+/* $NetBSD: iop.c,v 1.88 2017/10/28 04:53:55 riastradh Exp $ */
/*-
* Copyright (c) 2000, 2001, 2002, 2007 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: iop.c,v 1.87 2015/08/16 19:21:33 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iop.c,v 1.88 2017/10/28 04:53:55 riastradh Exp $");
#include "iop.h"
@@ -57,6 +57,7 @@ __KERNEL_RCSID(0, "$NetBSD: iop.c,v 1.87 2015/08/16 19:21:33 msaitoh Exp $");
#include <dev/i2o/iopreg.h>
#include <dev/i2o/iopvar.h>
+#include "ioconf.h"
#include "locators.h"
#define POLL(ms, cond) \
@@ -89,8 +90,6 @@ static void *iop_sdh;
static struct i2o_systab *iop_systab;
static int iop_systab_size;
-extern struct cfdriver iop_cd;
-
dev_type_open(iopopen);
dev_type_close(iopclose);
dev_type_ioctl(iopioctl);
diff --git a/sys/dev/ic/aac.c b/sys/dev/ic/aac.c
index 5557f9eaf2d..f16907db30f 100644
--- a/sys/dev/ic/aac.c
+++ b/sys/dev/ic/aac.c
@@ -1,4 +1,4 @@
-/* $NetBSD: aac.c,v 1.45 2016/09/27 03:33:32 pgoyette Exp $ */
+/* $NetBSD: aac.c,v 1.46 2017/10/28 04:53:55 riastradh Exp $ */
/*-
* Copyright (c) 2002, 2007 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aac.c,v 1.45 2016/09/27 03:33:32 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aac.c,v 1.46 2017/10/28 04:53:55 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -145,8 +145,6 @@ MALLOC_DEFINE(M_AACBUF, "aacbuf", "Buffers for aac(4)");
static void *aac_sdh;
-extern struct cfdriver aac_cd;
-
int
aac_attach(struct aac_softc *sc)
{
diff --git a/sys/dev/ic/aic6360.c b/sys/dev/ic/aic6360.c
index 0728daf8bf3..8ffc22f89ec 100644
--- a/sys/dev/ic/aic6360.c
+++ b/sys/dev/ic/aic6360.c
@@ -1,4 +1,4 @@
-/* $NetBSD: aic6360.c,v 1.100 2017/01/11 07:16:48 skrll Exp $ */
+/* $NetBSD: aic6360.c,v 1.101 2017/10/28 04:53:55 riastradh Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Charles M. Hannum. All rights reserved.
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aic6360.c,v 1.100 2017/01/11 07:16:48 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aic6360.c,v 1.101 2017/10/28 04:53:55 riastradh Exp $");
#include "opt_ddb.h"
@@ -141,6 +141,8 @@ __KERNEL_RCSID(0, "$NetBSD: aic6360.c,v 1.100 2017/01/11 07:16:48 skrll Exp $");
#include <dev/ic/aic6360reg.h>
#include <dev/ic/aic6360var.h>
+#include "ioconf.h"
+
#ifndef DDB
#define Debugger() panic("should call debugger here (aic6360.c)")
#endif /* ! DDB */
@@ -2149,7 +2151,6 @@ aic_print_acb(struct aic_acb *acb)
void
aic_print_active_acb(void)
{
- extern struct cfdriver aic_cd;
struct aic_acb *acb;
struct aic_softc *sc = device_lookup_private(&aic_cd, 0);
diff --git a/sys/dev/ic/attimer.c b/sys/dev/ic/attimer.c
index fcd531d4a68..8e8c4fcd80e 100644
--- a/sys/dev/ic/attimer.c
+++ b/sys/dev/ic/attimer.c
@@ -1,4 +1,4 @@
-/* $NetBSD: attimer.c,v 1.11 2011/11/23 23:07:32 jmcneill Exp $ */
+/* $NetBSD: attimer.c,v 1.12 2017/10/28 04:53:55 riastradh Exp $ */
/*
* Copyright (c) 2005 The NetBSD Foundation.
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: attimer.c,v 1.11 2011/11/23 23:07:32 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: attimer.c,v 1.12 2017/10/28 04:53:55 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -47,7 +47,7 @@ __KERNEL_RCSID(0, "$NetBSD: attimer.c,v 1.11 2011/11/23 23:07:32 jmcneill Exp $"
#include <dev/ic/attimervar.h>
#include <dev/ic/i8253reg.h>
-extern struct cfdriver attimer_cd;
+#include "ioconf.h"
void
attimer_attach(struct attimer_softc *sc)
diff --git a/sys/dev/ic/cac.c b/sys/dev/ic/cac.c
index 6d92f092496..2bea98acbab 100644
--- a/sys/dev/ic/cac.c
+++ b/sys/dev/ic/cac.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cac.c,v 1.57 2016/09/27 03:33:32 pgoyette Exp $ */
+/* $NetBSD: cac.c,v 1.58 2017/10/28 04:53:55 riastradh Exp $ */
/*-
* Copyright (c) 2000, 2006, 2007 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cac.c,v 1.57 2016/09/27 03:33:32 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cac.c,v 1.58 2017/10/28 04:53:55 riastradh Exp $");
#if defined(_KERNEL_OPT)
#include "bio.h"
@@ -61,6 +61,7 @@ __KERNEL_RCSID(0, "$NetBSD: cac.c,v 1.57 2016/09/27 03:33:32 pgoyette Exp $");
#include <dev/biovar.h>
#endif /* NBIO > 0 */
+#include "ioconf.h"
#include "locators.h"
static struct cac_ccb *cac_ccb_alloc(struct cac_softc *, int);
@@ -244,7 +245,6 @@ cac_rescan(device_t self, const char *attr, const int *flags)
static void
cac_shutdown(void *cookie)
{
- extern struct cfdriver cac_cd;
struct cac_softc *sc;
u_int8_t tbuf[512];
int i;
diff --git a/sys/dev/ic/clmpcc.c b/sys/dev/ic/clmpcc.c
index be21c83fc94..cdce4c9dbe1 100644
--- a/sys/dev/ic/clmpcc.c
+++ b/sys/dev/ic/clmpcc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: clmpcc.c,v 1.51 2014/11/15 19:18:18 christos Exp $ */
+/* $NetBSD: clmpcc.c,v 1.52 2017/10/28 04:53:55 riastradh Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clmpcc.c,v 1.51 2014/11/15 19:18:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clmpcc.c,v 1.52 2017/10/28 04:53:55 riastradh Exp $");
#include "opt_ddb.h"
@@ -61,6 +61,7 @@ __KERNEL_RCSID(0, "$NetBSD: clmpcc.c,v 1.51 2014/11/15 19:18:18 christos Exp $")
#include <dev/ic/clmpccvar.h>
#include <dev/cons.h>
+#include "ioconf.h"
#if defined(CLMPCC_ONLY_BYTESWAP_LOW) && defined(CLMPCC_ONLY_BYTESWAP_HIGH)
#error "CLMPCC_ONLY_BYTESWAP_LOW and CLMPCC_ONLY_BYTESWAP_HIGH are mutually exclusive."
@@ -84,8 +85,6 @@ static int clmpcc_modem_control(struct clmpcc_chan *, int, int);
*/
#define ISCLR(v, f) (((v) & (f)) == 0)
-extern struct cfdriver clmpcc_cd;
-
dev_type_open(clmpccopen);
dev_type_close(clmpccclose);
dev_type_read(clmpccread);
diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c
index 6d40ea30ed2..e0556b8e849 100644
--- a/sys/dev/ic/com.c
+++ b/sys/dev/ic/com.c
@@ -1,4 +1,4 @@
-/* $NetBSD: com.c,v 1.342 2017/08/10 13:25:49 nat Exp $ */
+/* $NetBSD: com.c,v 1.343 2017/10/28 04:53:55 riastradh Exp $ */
/*-
* Copyright (c) 1998, 1999, 2004, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.342 2017/08/10 13:25:49 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.343 2017/10/28 04:53:55 riastradh Exp $");
#include "opt_com.h"
#include "opt_ddb.h"
@@ -128,6 +128,8 @@ __KERNEL_RCSID(0, "$NetBSD: com.c,v 1.342 2017/08/10 13:25:49 nat Exp $");
#define com_lcr com_cfcr
#include <dev/cons.h>
+#include "ioconf.h"
+
#ifdef COM_REGMAP
#define CSR_WRITE_1(r, o, v) \
bus_space_write_1((r)->cr_iot, (r)->cr_ioh, (r)->cr_map[o], v)
@@ -190,8 +192,6 @@ integrate void com_stsoft(struct com_softc *, struct tty *);
integrate void com_schedrx(struct com_softc *);
void comdiag(void *);
-extern struct cfdriver com_cd;
-
dev_type_open(comopen);
dev_type_close(comclose);
dev_type_read(comread);
diff --git a/sys/dev/ic/cy.c b/sys/dev/ic/cy.c
index 450a15f2617..32288b14991 100644
--- a/sys/dev/ic/cy.c
+++ b/sys/dev/ic/cy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cy.c,v 1.60 2014/11/15 19:18:18 christos Exp $ */
+/* $NetBSD: cy.c,v 1.61 2017/10/28 04:53:55 riastradh Exp $ */
/*
* cy.c
@@ -16,7 +16,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cy.c,v 1.60 2014/11/15 19:18:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cy.c,v 1.61 2017/10/28 04:53:55 riastradh Exp $");
#include <sys/param.h>
#include <sys/ioctl.h>
@@ -38,6 +38,8 @@ __KERNEL_RCSID(0, "$NetBSD: cy.c,v 1.60 2014/11/15 19:18:18 christos Exp $");
#include <dev/ic/cyreg.h>
#include <dev/ic/cyvar.h>
+#include "ioconf.h"
+
static int cyparam(struct tty *, struct termios *);
static void cystart(struct tty *);
static void cy_poll(void *);
@@ -46,8 +48,6 @@ static void cy_enable_transmitter(struct cy_softc *, struct cy_port *);
static void cd1400_channel_cmd(struct cy_softc *, struct cy_port *, int);
static int cy_speed(speed_t, int *, int *, int);
-extern struct cfdriver cy_cd;
-
static dev_type_open(cyopen);
static dev_type_close(cyclose);
static dev_type_read(cyread);
diff --git a/sys/dev/ic/dpt.c b/sys/dev/ic/dpt.c
index 05edc6864e0..f014fad533f 100644
--- a/sys/dev/ic/dpt.c
+++ b/sys/dev/ic/dpt.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dpt.c,v 1.73 2016/07/07 06:55:41 msaitoh Exp $ */
+/* $NetBSD: dpt.c,v 1.74 2017/10/28 04:53:55 riastradh Exp $ */
/*-
* Copyright (c) 1997, 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dpt.c,v 1.73 2016/07/07 06:55:41 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dpt.c,v 1.74 2017/10/28 04:53:55 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -99,6 +99,8 @@ __KERNEL_RCSID(0, "$NetBSD: dpt.c,v 1.73 2016/07/07 06:55:41 msaitoh Exp $");
#include <dev/i2o/dptivar.h>
+#include "ioconf.h"
+
#ifdef DEBUG
#define DPRINTF(x) printf x
#else
@@ -151,8 +153,6 @@ const struct cdevsw dpt_cdevsw = {
.d_flag = D_OTHER,
};
-extern struct cfdriver dpt_cd;
-
static struct dpt_sig dpt_sig = {
{ 'd', 'P', 't', 'S', 'i', 'G'},
SIG_VERSION,
diff --git a/sys/dev/ic/icp_ioctl.c b/sys/dev/ic/icp_ioctl.c
index a6b0545e364..70794223597 100644
--- a/sys/dev/ic/icp_ioctl.c
+++ b/sys/dev/ic/icp_ioctl.c
@@ -1,4 +1,4 @@
-/* $NetBSD: icp_ioctl.c,v 1.21 2014/07/25 08:10:37 dholland Exp $ */
+/* $NetBSD: icp_ioctl.c,v 1.22 2017/10/28 04:53:55 riastradh Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -69,7 +69,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: icp_ioctl.c,v 1.21 2014/07/25 08:10:37 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: icp_ioctl.c,v 1.22 2017/10/28 04:53:55 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -85,6 +85,8 @@ __KERNEL_RCSID(0, "$NetBSD: icp_ioctl.c,v 1.21 2014/07/25 08:10:37 dholland Exp
#include <dev/ic/icpreg.h>
#include <dev/ic/icpvar.h>
+#include "ioconf.h"
+
/* These are simply the same as ICP's "iir" driver for FreeBSD. */
#define ICP_DRIVER_VERSION 1
#define ICP_DRIVER_SUBVERSION 3
@@ -107,8 +109,6 @@ const struct cdevsw icp_cdevsw = {
.d_flag = D_OTHER
};
-extern struct cfdriver icp_cd;
-
kmutex_t icp_ioctl_mutex;
static int
diff --git a/sys/dev/ic/joy.c b/sys/dev/ic/joy.c
index d2d5f22c25f..8a51b58925d 100644
--- a/sys/dev/ic/joy.c
+++ b/sys/dev/ic/joy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: joy.c,v 1.20 2014/07/25 08:10:37 dholland Exp $ */
+/* $NetBSD: joy.c,v 1.21 2017/10/28 04:53:55 riastradh Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: joy.c,v 1.20 2014/07/25 08:10:37 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: joy.c,v 1.21 2017/10/28 04:53:55 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -76,6 +76,8 @@ __KERNEL_RCSID(0, "$NetBSD: joy.c,v 1.20 2014/07/25 08:10:37 dholland Exp $");
#include <dev/ic/joyvar.h>
+#include "ioconf.h"
+
/*
* The game port can manage 4 buttons and 4 variable resistors (usually 2
* joysticks, each with 2 buttons and 2 pots.) via the port at address 0x201.
@@ -94,8 +96,6 @@ __KERNEL_RCSID(0, "$NetBSD: joy.c,v 1.20 2014/07/25 08:10:37 dholland Exp $");
#define JOY_TIMEOUT 2000 /* 2 milliseconds */
#endif
-extern struct cfdriver joy_cd;
-
static dev_type_open(joyopen);
static dev_type_close(joyclose);
static dev_type_read(joyread);
diff --git a/sys/dev/ic/lpt.c b/sys/dev/ic/lpt.c
index 4c18c6f697c..2c1374ab241 100644
--- a/sys/dev/ic/lpt.c
+++ b/sys/dev/ic/lpt.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lpt.c,v 1.80 2014/07/25 08:10:37 dholland Exp $ */
+/* $NetBSD: lpt.c,v 1.81 2017/10/28 04:53:55 riastradh Exp $ */
/*
* Copyright (c) 1993, 1994 Charles M. Hannum.
@@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lpt.c,v 1.80 2014/07/25 08:10:37 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lpt.c,v 1.81 2017/10/28 04:53:55 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -73,6 +73,8 @@ __KERNEL_RCSID(0, "$NetBSD: lpt.c,v 1.80 2014/07/25 08:10:37 dholland Exp $");
#include <dev/ic/lptreg.h>
#include <dev/ic/lptvar.h>
+#include "ioconf.h"
+
#define TIMEOUT hz*16 /* wait up to 16 seconds for a ready */
#define STEP hz/4
@@ -88,8 +90,6 @@ __KERNEL_RCSID(0, "$NetBSD: lpt.c,v 1.80 2014/07/25 08:10:37 dholland Exp $");
int lptdebug = 0;
#endif
-extern struct cfdriver lpt_cd;
-
dev_type_open(lptopen);
dev_type_close(lptclose);
dev_type_write(lptwrite);
diff --git a/sys/dev/ic/mb89352.c b/sys/dev/ic/mb89352.c
index a95813684ad..81917c27ada 100644
--- a/sys/dev/ic/mb89352.c
+++ b/sys/dev/ic/mb89352.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mb89352.c,v 1.55 2017/01/11 07:16:48 skrll Exp $ */
+/* $NetBSD: mb89352.c,v 1.56 2017/10/28 04:53:55 riastradh Exp $ */
/* NecBSD: mb89352.c,v 1.4 1998/03/14 07:31:20 kmatsuda Exp */
/*-
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mb89352.c,v 1.55 2017/01/11 07:16:48 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mb89352.c,v 1.56 2017/10/28 04:53:55 riastradh Exp $");
#ifdef DDB
#define integrate
@@ -164,6 +164,8 @@ __KERNEL_RCSID(0, "$NetBSD: mb89352.c,v 1.55 2017/01/11 07:16:48 skrll Exp $");
#include <dev/ic/mb89352reg.h>
#include <dev/ic/mb89352var.h>
+#include "ioconf.h"
+
#ifndef DDB
#define Debugger() panic("should call debugger here (mb89352.c)")
#endif /* ! DDB */
@@ -199,8 +201,6 @@ void spc_show_scsi_cmd(struct spc_acb *);
void spc_print_active_acb(void);
#endif
-extern struct cfdriver spc_cd;
-
/*
* INITIALIZATION ROUTINES (probe, attach ++)
*/
diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c
index c50b20100fc..8629e297fcf 100644
--- a/sys/dev/ic/mfi.c
+++ b/sys/dev/ic/mfi.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mfi.c,v 1.57 2015/04/04 15:10:47 christos Exp $ */
+/* $NetBSD: mfi.c,v 1.58 2017/10/28 04:53:55 riastradh Exp $ */
/* $OpenBSD: mfi.c,v 1.66 2006/11/28 23:59:45 dlg Exp $ */
/*
@@ -73,7 +73,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.57 2015/04/04 15:10:47 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.58 2017/10/28 04:53:55 riastradh Exp $");
#include "bio.h"
@@ -108,6 +108,8 @@ __KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.57 2015/04/04 15:10:47 christos Exp $");
#include <dev/biovar.h>
#endif /* NBIO > 0 */
+#include "ioconf.h"
+
#ifdef MFI_DEBUG
uint32_t mfi_debug = 0
/* | MFI_D_CMD */
@@ -198,8 +200,6 @@ const struct cdevsw mfi_cdevsw = {
.d_flag = D_OTHER
};
-extern struct cfdriver mfi_cd;
-
static uint32_t mfi_xscale_fw_state(struct mfi_softc *sc);
static void mfi_xscale_intr_ena(struct mfi_softc *sc);
static void mfi_xscale_intr_dis(struct mfi_softc *sc);
diff --git a/sys/dev/ic/midway.c b/sys/dev/ic/midway.c
index 1359b55adc5..d2ade91c4f8 100644
--- a/sys/dev/ic/midway.c
+++ b/sys/dev/ic/midway.c
@@ -1,4 +1,4 @@
-/* $NetBSD: midway.c,v 1.100 2017/03/31 08:38:13 msaitoh Exp $ */
+/* $NetBSD: midway.c,v 1.101 2017/10/28 04:53:55 riastradh Exp $ */
/* (sync'd to midway.c 1.68) */
/*
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: midway.c,v 1.100 2017/03/31 08:38:13 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: midway.c,v 1.101 2017/10/28 04:53:55 riastradh Exp $");
#include "opt_natm.h"
@@ -187,6 +187,7 @@ __KERNEL_RCSID(0, "$NetBSD: midway.c,v 1.100 2017/03/31 08:38:13 msaitoh Exp $")
#if defined(__NetBSD__) || defined(__OpenBSD__)
#include <dev/ic/midwayreg.h>
#include <dev/ic/midwayvar.h>
+#include "ioconf.h"
#if defined(__alpha__)
/* XXX XXX NEED REAL DMA MAPPING SUPPORT XXX XXX */
#undef vtophys
@@ -248,12 +249,6 @@ __KERNEL_RCSID(0, "$NetBSD: midway.c,v 1.100 2017/03/31 08:38:13 msaitoh Exp $")
int en_dma = EN_DMA; /* use DMA (switch off for dbg) */
/*
- * autoconfig attachments
- */
-
-extern struct cfdriver en_cd;
-
-/*
* local structures
*/
diff --git a/sys/dev/ic/mlx.c b/sys/dev/ic/mlx.c
index c6dc5bfba42..855b309eb54 100644
--- a/sys/dev/ic/mlx.c
+++ b/sys/dev/ic/mlx.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mlx.c,v 1.65 2016/09/27 03:33:32 pgoyette Exp $ */
+/* $NetBSD: mlx.c,v 1.66 2017/10/28 04:53:55 riastradh Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mlx.c,v 1.65 2016/09/27 03:33:32 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mlx.c,v 1.66 2017/10/28 04:53:55 riastradh Exp $");
#if defined(_KERNEL_OPT)
#include "ld.h"
@@ -97,6 +97,7 @@ __KERNEL_RCSID(0, "$NetBSD: mlx.c,v 1.65 2016/09/27 03:33:32 pgoyette Exp $");
#include <dev/ic/mlxio.h>
#include <dev/ic/mlxvar.h>
+#include "ioconf.h"
#include "locators.h"
#define MLX_TIMEOUT 60
@@ -146,7 +147,6 @@ const struct cdevsw mlx_cdevsw = {
.d_flag = D_OTHER
};
-extern struct cfdriver mlx_cd;
static struct lwp *mlx_periodic_lwp;
static void *mlx_sdh;
@@ -680,7 +680,6 @@ static void
mlx_adjqparam(struct mlx_softc *mlx, int mpu, int slop)
{
#if NLD > 0
- extern struct cfdriver ld_cd;
struct ld_softc *ld;
int i;
diff --git a/sys/dev/ic/nvme.c b/sys/dev/ic/nvme.c
index 9410a981a0e..7feb342a3cb 100644
--- a/sys/dev/ic/nvme.c
+++ b/sys/dev/ic/nvme.c
@@ -1,4 +1,4 @@
-/* $NetBSD: nvme.c,v 1.30 2017/06/01 02:45:10 chs Exp $ */
+/* $NetBSD: nvme.c,v 1.31 2017/10/28 04:53:55 riastradh Exp $ */
/* $OpenBSD: nvme.c,v 1.49 2016/04/18 05:59:50 dlg Exp $ */
/*
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.30 2017/06/01 02:45:10 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.31 2017/10/28 04:53:55 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -40,6 +40,8 @@ __KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.30 2017/06/01 02:45:10 chs Exp $");
#include <dev/ic/nvmevar.h>
#include <dev/ic/nvmeio.h>
+#include "ioconf.h"
+
int nvme_adminq_size = 32;
int nvme_ioq_size = 1024;
@@ -1662,8 +1664,6 @@ const struct cdevsw nvme_cdevsw = {
.d_flag = D_OTHER,
};
-extern struct cfdriver nvme_cd;
-
/*
* Accept an open operation on the control device.
*/
diff --git a/sys/dev/ic/rrunner.c b/sys/dev/ic/rrunner.c
index 0254d4c4684..c0e00b3be12 100644
--- a/sys/dev/ic/rrunner.c
+++ b/sys/dev/ic/rrunner.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rrunner.c,v 1.84 2017/08/20 11:00:30 maxv Exp $ */
+/* $NetBSD: rrunner.c,v 1.85 2017/10/28 04:53:55 riastradh Exp $ */
/*
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rrunner.c,v 1.84 2017/08/20 11:00:30 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rrunner.c,v 1.85 2017/10/28 04:53:55 riastradh Exp $");
#include "opt_inet.h"
@@ -85,13 +85,12 @@ __KERNEL_RCSID(0, "$NetBSD: rrunner.c,v 1.84 2017/08/20 11:00:30 maxv Exp $");
#include <dev/ic/rrunnerreg.h>
#include <dev/ic/rrunnervar.h>
+#include "ioconf.h"
+
/*
#define ESH_PRINTF
*/
-/* Autoconfig definition of driver back-end */
-extern struct cfdriver esh_cd;
-
struct esh_softc *esh_softc_debug[22]; /* for gdb */
#ifdef DIAGNOSTIC
diff --git a/sys/dev/ic/tpm.c b/sys/dev/ic/tpm.c
index c3e09eda4fe..0ec325a4cc5 100644
--- a/sys/dev/ic/tpm.c
+++ b/sys/dev/ic/tpm.c
@@ -1,4 +1,4 @@
-/* $NetBSD: tpm.c,v 1.11 2014/07/25 08:10:37 dholland Exp $ */
+/* $NetBSD: tpm.c,v 1.12 2017/10/28 04:53:55 riastradh Exp $ */
/*
* Copyright (c) 2008, 2009 Michael Shalayeff
* Copyright (c) 2009, 2010 Hans-Jörg Höxer
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tpm.c,v 1.11 2014/07/25 08:10:37 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tpm.c,v 1.12 2017/10/28 04:53:55 riastradh Exp $");
#if 0
#define TPM_DEBUG
@@ -38,6 +38,8 @@ __KERNEL_RCSID(0, "$NetBSD: tpm.c,v 1.11 2014/07/25 08:10:37 dholland Exp $");
#include <dev/ic/tpmreg.h>
#include <dev/ic/tpmvar.h>
+#include "ioconf.h"
+
/* Set when enabling legacy interface in host bridge. */
int tpm_enabled;
@@ -74,7 +76,6 @@ static dev_type_read(tpmread);
static dev_type_read(tpmwrite);
static dev_type_ioctl(tpmioctl);
-extern struct cfdriver tpm_cd;
#define TPMUNIT(a) minor(a)
const struct cdevsw tpm_cdevsw = {