Module Name: src Committed By: riastradh Date: Sat Oct 28 04:53:56 UTC 2017
Modified Files: src/sys/dev/acpi: acpi.c pckbc_acpi.c tpm_acpi.c src/sys/dev/adb: adb_bt.c adb_kbd.c src/sys/dev/altmem: altmem.c src/sys/dev/apm: apm.c src/sys/dev/ata: ata.c src/sys/dev/dec: vsxxx.c src/sys/dev/dm: device-mapper.c src/sys/dev/dtv: dtv_device.c src/sys/dev/flash: flash.c src/sys/dev/gpib: ct.c mt.c ppi.c rd.c src/sys/dev/gpio: gpio.c gpioiic.c gpiolock.c gpioow.c gpiopwm.c gpiosim.c src/sys/dev/hdmicec: hdmicec.c src/sys/dev/hpc: hpcapm.c hpf1275a_tty.c src/sys/dev/i2c: at24cxx.c ds1307.c i2c.c m41st84.c m41t00.c pcf8583.c x1226.c src/sys/dev/i2o: dpti.c iop.c src/sys/dev/ic: aac.c aic6360.c attimer.c cac.c clmpcc.c com.c cy.c dpt.c icp_ioctl.c joy.c lpt.c mb89352.c mfi.c midway.c mlx.c nvme.c rrunner.c tpm.c Log Message: Kill some more extern struct cfdriver declarations. Down with externs in .c! To generate a diff of this commit: cvs rdiff -u -r1.263 -r1.264 src/sys/dev/acpi/acpi.c cvs rdiff -u -r1.35 -r1.36 src/sys/dev/acpi/pckbc_acpi.c cvs rdiff -u -r1.4 -r1.5 src/sys/dev/acpi/tpm_acpi.c cvs rdiff -u -r1.6 -r1.7 src/sys/dev/adb/adb_bt.c cvs rdiff -u -r1.26 -r1.27 src/sys/dev/adb/adb_kbd.c cvs rdiff -u -r1.5 -r1.6 src/sys/dev/altmem/altmem.c cvs rdiff -u -r1.32 -r1.33 src/sys/dev/apm/apm.c cvs rdiff -u -r1.140 -r1.141 src/sys/dev/ata/ata.c cvs rdiff -u -r1.11 -r1.12 src/sys/dev/dec/vsxxx.c cvs rdiff -u -r1.38 -r1.39 src/sys/dev/dm/device-mapper.c cvs rdiff -u -r1.11 -r1.12 src/sys/dev/dtv/dtv_device.c cvs rdiff -u -r1.12 -r1.13 src/sys/dev/flash/flash.c cvs rdiff -u -r1.28 -r1.29 src/sys/dev/gpib/ct.c cvs rdiff -u -r1.30 -r1.31 src/sys/dev/gpib/mt.c cvs rdiff -u -r1.22 -r1.23 src/sys/dev/gpib/ppi.c cvs rdiff -u -r1.41 -r1.42 src/sys/dev/gpib/rd.c cvs rdiff -u -r1.59 -r1.60 src/sys/dev/gpio/gpio.c cvs rdiff -u -r1.7 -r1.8 src/sys/dev/gpio/gpioiic.c cvs rdiff -u -r1.4 -r1.5 src/sys/dev/gpio/gpiolock.c cvs rdiff -u -r1.14 -r1.15 src/sys/dev/gpio/gpioow.c cvs rdiff -u -r1.6 -r1.7 src/sys/dev/gpio/gpiopwm.c cvs rdiff -u -r1.20 -r1.21 src/sys/dev/gpio/gpiosim.c cvs rdiff -u -r1.1 -r1.2 src/sys/dev/hdmicec/hdmicec.c cvs rdiff -u -r1.21 -r1.22 src/sys/dev/hpc/hpcapm.c cvs rdiff -u -r1.28 -r1.29 src/sys/dev/hpc/hpf1275a_tty.c cvs rdiff -u -r1.24 -r1.25 src/sys/dev/i2c/at24cxx.c src/sys/dev/i2c/ds1307.c cvs rdiff -u -r1.55 -r1.56 src/sys/dev/i2c/i2c.c cvs rdiff -u -r1.22 -r1.23 src/sys/dev/i2c/m41st84.c cvs rdiff -u -r1.19 -r1.20 src/sys/dev/i2c/m41t00.c src/sys/dev/i2c/x1226.c cvs rdiff -u -r1.16 -r1.17 src/sys/dev/i2c/pcf8583.c cvs rdiff -u -r1.48 -r1.49 src/sys/dev/i2o/dpti.c cvs rdiff -u -r1.87 -r1.88 src/sys/dev/i2o/iop.c cvs rdiff -u -r1.45 -r1.46 src/sys/dev/ic/aac.c cvs rdiff -u -r1.100 -r1.101 src/sys/dev/ic/aic6360.c src/sys/dev/ic/midway.c cvs rdiff -u -r1.11 -r1.12 src/sys/dev/ic/attimer.c src/sys/dev/ic/tpm.c cvs rdiff -u -r1.57 -r1.58 src/sys/dev/ic/cac.c src/sys/dev/ic/mfi.c cvs rdiff -u -r1.51 -r1.52 src/sys/dev/ic/clmpcc.c cvs rdiff -u -r1.342 -r1.343 src/sys/dev/ic/com.c cvs rdiff -u -r1.60 -r1.61 src/sys/dev/ic/cy.c cvs rdiff -u -r1.73 -r1.74 src/sys/dev/ic/dpt.c cvs rdiff -u -r1.21 -r1.22 src/sys/dev/ic/icp_ioctl.c cvs rdiff -u -r1.20 -r1.21 src/sys/dev/ic/joy.c cvs rdiff -u -r1.80 -r1.81 src/sys/dev/ic/lpt.c cvs rdiff -u -r1.55 -r1.56 src/sys/dev/ic/mb89352.c cvs rdiff -u -r1.65 -r1.66 src/sys/dev/ic/mlx.c cvs rdiff -u -r1.30 -r1.31 src/sys/dev/ic/nvme.c cvs rdiff -u -r1.84 -r1.85 src/sys/dev/ic/rrunner.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/acpi/acpi.c diff -u src/sys/dev/acpi/acpi.c:1.263 src/sys/dev/acpi/acpi.c:1.264 --- src/sys/dev/acpi/acpi.c:1.263 Thu Jun 1 02:45:09 2017 +++ src/sys/dev/acpi/acpi.c Sat Oct 28 04:53:55 2017 @@ -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.2 #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; Index: src/sys/dev/acpi/pckbc_acpi.c diff -u src/sys/dev/acpi/pckbc_acpi.c:1.35 src/sys/dev/acpi/pckbc_acpi.c:1.36 --- src/sys/dev/acpi/pckbc_acpi.c:1.35 Tue Oct 18 22:08:30 2016 +++ src/sys/dev/acpi/pckbc_acpi.c Sat Oct 28 04:53:55 2017 @@ -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 #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); Index: src/sys/dev/acpi/tpm_acpi.c diff -u src/sys/dev/acpi/tpm_acpi.c:1.4 src/sys/dev/acpi/tpm_acpi.c:1.5 --- src/sys/dev/acpi/tpm_acpi.c:1.4 Sat Mar 1 16:59:41 2014 +++ src/sys/dev/acpi/tpm_acpi.c Sat Oct 28 04:53:55 2017 @@ -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 #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) { Index: src/sys/dev/adb/adb_bt.c diff -u src/sys/dev/adb/adb_bt.c:1.6 src/sys/dev/adb/adb_bt.c:1.7 --- src/sys/dev/adb/adb_bt.c:1.6 Wed Sep 8 04:48:03 2010 +++ src/sys/dev/adb/adb_bt.c Sat Oct 28 04:53:55 2017 @@ -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 #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 Index: src/sys/dev/adb/adb_kbd.c diff -u src/sys/dev/adb/adb_kbd.c:1.26 src/sys/dev/adb/adb_kbd.c:1.27 --- src/sys/dev/adb/adb_kbd.c:1.26 Wed Jul 29 08:45:28 2015 +++ src/sys/dev/adb/adb_kbd.c Sat Oct 28 04:53:55 2017 @@ -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 #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_sof 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); Index: src/sys/dev/altmem/altmem.c diff -u src/sys/dev/altmem/altmem.c:1.5 src/sys/dev/altmem/altmem.c:1.6 --- src/sys/dev/altmem/altmem.c:1.5 Sun Apr 26 15:15:20 2015 +++ src/sys/dev/altmem/altmem.c Sat Oct 28 04:53:55 2017 @@ -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 <jmcne...@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 #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); Index: src/sys/dev/apm/apm.c diff -u src/sys/dev/apm/apm.c:1.32 src/sys/dev/apm/apm.c:1.33 --- src/sys/dev/apm/apm.c:1.32 Wed Oct 25 08:12:38 2017 +++ src/sys/dev/apm/apm.c Sat Oct 28 04:53:54 2017 @@ -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 #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); Index: src/sys/dev/ata/ata.c diff -u src/sys/dev/ata/ata.c:1.140 src/sys/dev/ata/ata.c:1.141 --- src/sys/dev/ata/ata.c:1.140 Fri Oct 20 07:06:07 2017 +++ src/sys/dev/ata/ata.c Sat Oct 28 04:53:54 2017 @@ -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.14 #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 *); Index: src/sys/dev/dec/vsxxx.c diff -u src/sys/dev/dec/vsxxx.c:1.11 src/sys/dev/dec/vsxxx.c:1.12 --- src/sys/dev/dec/vsxxx.c:1.11 Sat Mar 14 21:04:19 2009 +++ src/sys/dev/dec/vsxxx.c Sat Oct 28 04:53:54 2017 @@ -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. #include <dev/dec/vsxxxvar.h> +#include "ioconf.h" + /* * XXX XXX XXX * @@ -73,8 +75,6 @@ __KERNEL_RCSID(0, "$NetBSD: vsxxx.c,v 1. #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 *); Index: src/sys/dev/dm/device-mapper.c diff -u src/sys/dev/dm/device-mapper.c:1.38 src/sys/dev/dm/device-mapper.c:1.39 --- src/sys/dev/dm/device-mapper.c:1.38 Mon Jul 11 11:31:50 2016 +++ src/sys/dev/dm/device-mapper.c Sat Oct 28 04:53:55 2017 @@ -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; /* Index: src/sys/dev/dtv/dtv_device.c diff -u src/sys/dev/dtv/dtv_device.c:1.11 src/sys/dev/dtv/dtv_device.c:1.12 --- src/sys/dev/dtv/dtv_device.c:1.11 Sat Aug 9 13:34:10 2014 +++ src/sys/dev/dtv/dtv_device.c Sat Oct 28 04:53:55 2017 @@ -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 <jmcne...@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 #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) { Index: src/sys/dev/flash/flash.c diff -u src/sys/dev/flash/flash.c:1.12 src/sys/dev/flash/flash.c:1.13 --- src/sys/dev/flash/flash.c:1.12 Fri Jul 25 08:10:36 2014 +++ src/sys/dev/flash/flash.c Sat Oct 28 04:53:55 2017 @@ -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. #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. int flashdebug = FLASH_DEBUG; #endif -extern struct cfdriver flash_cd; - dev_type_open(flashopen); dev_type_close(flashclose); dev_type_read(flashread); Index: src/sys/dev/gpib/ct.c diff -u src/sys/dev/gpib/ct.c:1.28 src/sys/dev/gpib/ct.c:1.29 --- src/sys/dev/gpib/ct.c:1.28 Mon Jul 11 11:31:50 2016 +++ src/sys/dev/gpib/ct.c Sat Oct 28 04:53:56 2017 @@ -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 #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; Index: src/sys/dev/gpib/mt.c diff -u src/sys/dev/gpib/mt.c:1.30 src/sys/dev/gpib/mt.c:1.31 --- src/sys/dev/gpib/mt.c:1.30 Thu Jul 14 04:00:45 2016 +++ src/sys/dev/gpib/mt.c Sat Oct 28 04:53:56 2017 @@ -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 #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; Index: src/sys/dev/gpib/ppi.c diff -u src/sys/dev/gpib/ppi.c:1.22 src/sys/dev/gpib/ppi.c:1.23 --- src/sys/dev/gpib/ppi.c:1.22 Fri Jul 25 08:10:36 2014 +++ src/sys/dev/gpib/ppi.c Sat Oct 28 04:53:56 2017 @@ -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 #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 *); Index: src/sys/dev/gpib/rd.c diff -u src/sys/dev/gpib/rd.c:1.41 src/sys/dev/gpib/rd.c:1.42 --- src/sys/dev/gpib/rd.c:1.41 Mon Jul 11 11:31:50 2016 +++ src/sys/dev/gpib/rd.c Sat Oct 28 04:53:56 2017 @@ -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 #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) { Index: src/sys/dev/gpio/gpio.c diff -u src/sys/dev/gpio/gpio.c:1.59 src/sys/dev/gpio/gpio.c:1.60 --- src/sys/dev/gpio/gpio.c:1.59 Thu Jul 6 10:43:06 2017 +++ src/sys/dev/gpio/gpio.c Sat Oct 28 04:53:56 2017 @@ -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.5 #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) { Index: src/sys/dev/gpio/gpioiic.c diff -u src/sys/dev/gpio/gpioiic.c:1.7 src/sys/dev/gpio/gpioiic.c:1.8 --- src/sys/dev/gpio/gpioiic.c:1.7 Tue Sep 1 19:25:32 2015 +++ src/sys/dev/gpio/gpioiic.c Sat Oct 28 04:53:56 2017 @@ -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 #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, Index: src/sys/dev/gpio/gpiolock.c diff -u src/sys/dev/gpio/gpiolock.c:1.4 src/sys/dev/gpio/gpiolock.c:1.5 --- src/sys/dev/gpio/gpiolock.c:1.4 Fri Jan 20 12:25:07 2017 +++ src/sys/dev/gpio/gpiolock.c Sat Oct 28 04:53:56 2017 @@ -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 <m...@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) Index: src/sys/dev/gpio/gpioow.c diff -u src/sys/dev/gpio/gpioow.c:1.14 src/sys/dev/gpio/gpioow.c:1.15 --- src/sys/dev/gpio/gpioow.c:1.14 Wed Sep 7 07:43:05 2011 +++ src/sys/dev/gpio/gpioow.c Sat Oct 28 04:53:56 2017 @@ -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 #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, Index: src/sys/dev/gpio/gpiopwm.c diff -u src/sys/dev/gpio/gpiopwm.c:1.6 src/sys/dev/gpio/gpiopwm.c:1.7 --- src/sys/dev/gpio/gpiopwm.c:1.6 Fri Jan 20 12:25:07 2017 +++ src/sys/dev/gpio/gpiopwm.c Sat Oct 28 04:53:56 2017 @@ -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 <m...@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) Index: src/sys/dev/gpio/gpiosim.c diff -u src/sys/dev/gpio/gpiosim.c:1.20 src/sys/dev/gpio/gpiosim.c:1.21 --- src/sys/dev/gpio/gpiosim.c:1.20 Fri Jan 20 12:25:07 2017 +++ src/sys/dev/gpio/gpiosim.c Sat Oct 28 04:53:56 2017 @@ -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, 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) { Index: src/sys/dev/hdmicec/hdmicec.c diff -u src/sys/dev/hdmicec/hdmicec.c:1.1 src/sys/dev/hdmicec/hdmicec.c:1.2 --- src/sys/dev/hdmicec/hdmicec.c:1.1 Sat Aug 1 21:19:24 2015 +++ src/sys/dev/hdmicec/hdmicec.c Sat Oct 28 04:53:56 2017 @@ -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 <jmcne...@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 #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); Index: src/sys/dev/hpc/hpcapm.c diff -u src/sys/dev/hpc/hpcapm.c:1.21 src/sys/dev/hpc/hpcapm.c:1.22 --- src/sys/dev/hpc/hpcapm.c:1.21 Sun Jun 25 12:21:00 2017 +++ src/sys/dev/hpc/hpcapm.c Sat Oct 28 04:53:56 2017 @@ -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 #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) { Index: src/sys/dev/hpc/hpf1275a_tty.c diff -u src/sys/dev/hpc/hpf1275a_tty.c:1.28 src/sys/dev/hpc/hpf1275a_tty.c:1.29 --- src/sys/dev/hpc/hpf1275a_tty.c:1.28 Wed Aug 2 00:58:18 2017 +++ src/sys/dev/hpc/hpf1275a_tty.c Sat Oct 28 04:53:56 2017 @@ -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 #include <dev/hpc/pckbd_encode.h> #endif - -extern struct cfdriver hpf1275a_cd; +#include "ioconf.h" struct hpf1275a_softc { device_t sc_dev; Index: src/sys/dev/i2c/at24cxx.c diff -u src/sys/dev/i2c/at24cxx.c:1.24 src/sys/dev/i2c/at24cxx.c:1.25 --- src/sys/dev/i2c/at24cxx.c:1.24 Sat Oct 21 03:17:09 2017 +++ src/sys/dev/i2c/at24cxx.c Sat Oct 28 04:53:55 2017 @@ -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 #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, dev 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); Index: src/sys/dev/i2c/ds1307.c diff -u src/sys/dev/i2c/ds1307.c:1.24 src/sys/dev/i2c/ds1307.c:1.25 --- src/sys/dev/i2c/ds1307.c:1.24 Tue Oct 18 18:54:54 2016 +++ src/sys/dev/i2c/ds1307.c Sat Oct 28 04:53:55 2017 @@ -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 #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_ 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); Index: src/sys/dev/i2c/i2c.c diff -u src/sys/dev/i2c/i2c.c:1.55 src/sys/dev/i2c/i2c.c:1.56 --- src/sys/dev/i2c/i2c.c:1.55 Thu Jun 1 02:45:10 2017 +++ src/sys/dev/i2c/i2c.c Sat Oct 28 04:53:55 2017 @@ -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 #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 **); Index: src/sys/dev/i2c/m41st84.c diff -u src/sys/dev/i2c/m41st84.c:1.22 src/sys/dev/i2c/m41st84.c:1.23 --- src/sys/dev/i2c/m41st84.c:1.22 Thu Nov 20 16:34:26 2014 +++ src/sys/dev/i2c/m41st84.c Sat Oct 28 04:53:55 2017 @@ -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 #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 s 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); Index: src/sys/dev/i2c/m41t00.c diff -u src/sys/dev/i2c/m41t00.c:1.19 src/sys/dev/i2c/m41t00.c:1.20 --- src/sys/dev/i2c/m41t00.c:1.19 Thu Nov 20 16:34:26 2014 +++ src/sys/dev/i2c/m41t00.c Sat Oct 28 04:53:55 2017 @@ -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 #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, devi 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); Index: src/sys/dev/i2c/x1226.c diff -u src/sys/dev/i2c/x1226.c:1.19 src/sys/dev/i2c/x1226.c:1.20 --- src/sys/dev/i2c/x1226.c:1.19 Thu Nov 20 16:34:26 2014 +++ src/sys/dev/i2c/x1226.c Sat Oct 28 04:53:55 2017 @@ -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. #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 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); Index: src/sys/dev/i2c/pcf8583.c diff -u src/sys/dev/i2c/pcf8583.c:1.16 src/sys/dev/i2c/pcf8583.c:1.17 --- src/sys/dev/i2c/pcf8583.c:1.16 Thu Nov 20 16:34:26 2014 +++ src/sys/dev/i2c/pcf8583.c Sat Oct 28 04:53:55 2017 @@ -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 #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, devi 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); Index: src/sys/dev/i2o/dpti.c diff -u src/sys/dev/i2o/dpti.c:1.48 src/sys/dev/i2o/dpti.c:1.49 --- src/sys/dev/i2o/dpti.c:1.48 Fri Jul 25 08:10:37 2014 +++ src/sys/dev/i2o/dpti.c Sat Oct 28 04:53:55 2017 @@ -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.4 #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); Index: src/sys/dev/i2o/iop.c diff -u src/sys/dev/i2o/iop.c:1.87 src/sys/dev/i2o/iop.c:1.88 --- src/sys/dev/i2o/iop.c:1.87 Sun Aug 16 19:21:33 2015 +++ src/sys/dev/i2o/iop.c Sat Oct 28 04:53:55 2017 @@ -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 #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); Index: src/sys/dev/ic/aac.c diff -u src/sys/dev/ic/aac.c:1.45 src/sys/dev/ic/aac.c:1.46 --- src/sys/dev/ic/aac.c:1.45 Tue Sep 27 03:33:32 2016 +++ src/sys/dev/ic/aac.c Sat Oct 28 04:53:55 2017 @@ -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", "Buffe static void *aac_sdh; -extern struct cfdriver aac_cd; - int aac_attach(struct aac_softc *sc) { Index: src/sys/dev/ic/aic6360.c diff -u src/sys/dev/ic/aic6360.c:1.100 src/sys/dev/ic/aic6360.c:1.101 --- src/sys/dev/ic/aic6360.c:1.100 Wed Jan 11 07:16:48 2017 +++ src/sys/dev/ic/aic6360.c Sat Oct 28 04:53:55 2017 @@ -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 #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); Index: src/sys/dev/ic/midway.c diff -u src/sys/dev/ic/midway.c:1.100 src/sys/dev/ic/midway.c:1.101 --- src/sys/dev/ic/midway.c:1.100 Fri Mar 31 08:38:13 2017 +++ src/sys/dev/ic/midway.c Sat Oct 28 04:53:55 2017 @@ -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 #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 int en_dma = EN_DMA; /* use DMA (switch off for dbg) */ /* - * autoconfig attachments - */ - -extern struct cfdriver en_cd; - -/* * local structures */ Index: src/sys/dev/ic/attimer.c diff -u src/sys/dev/ic/attimer.c:1.11 src/sys/dev/ic/attimer.c:1.12 --- src/sys/dev/ic/attimer.c:1.11 Wed Nov 23 23:07:32 2011 +++ src/sys/dev/ic/attimer.c Sat Oct 28 04:53:55 2017 @@ -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 #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) Index: src/sys/dev/ic/tpm.c diff -u src/sys/dev/ic/tpm.c:1.11 src/sys/dev/ic/tpm.c:1.12 --- src/sys/dev/ic/tpm.c:1.11 Fri Jul 25 08:10:37 2014 +++ src/sys/dev/ic/tpm.c Sat Oct 28 04:53:55 2017 @@ -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 #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 = { Index: src/sys/dev/ic/cac.c diff -u src/sys/dev/ic/cac.c:1.57 src/sys/dev/ic/cac.c:1.58 --- src/sys/dev/ic/cac.c:1.57 Tue Sep 27 03:33:32 2016 +++ src/sys/dev/ic/cac.c Sat Oct 28 04:53:55 2017 @@ -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 #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 *at static void cac_shutdown(void *cookie) { - extern struct cfdriver cac_cd; struct cac_softc *sc; u_int8_t tbuf[512]; int i; Index: src/sys/dev/ic/mfi.c diff -u src/sys/dev/ic/mfi.c:1.57 src/sys/dev/ic/mfi.c:1.58 --- src/sys/dev/ic/mfi.c:1.57 Sat Apr 4 15:10:47 2015 +++ src/sys/dev/ic/mfi.c Sat Oct 28 04:53:55 2017 @@ -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 #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); Index: src/sys/dev/ic/clmpcc.c diff -u src/sys/dev/ic/clmpcc.c:1.51 src/sys/dev/ic/clmpcc.c:1.52 --- src/sys/dev/ic/clmpcc.c:1.51 Sat Nov 15 19:18:18 2014 +++ src/sys/dev/ic/clmpcc.c Sat Oct 28 04:53:55 2017 @@ -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 #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 */ #define ISCLR(v, f) (((v) & (f)) == 0) -extern struct cfdriver clmpcc_cd; - dev_type_open(clmpccopen); dev_type_close(clmpccclose); dev_type_read(clmpccread); Index: src/sys/dev/ic/com.c diff -u src/sys/dev/ic/com.c:1.342 src/sys/dev/ic/com.c:1.343 --- src/sys/dev/ic/com.c:1.342 Thu Aug 10 13:25:49 2017 +++ src/sys/dev/ic/com.c Sat Oct 28 04:53:55 2017 @@ -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.34 #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_sof 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); Index: src/sys/dev/ic/cy.c diff -u src/sys/dev/ic/cy.c:1.60 src/sys/dev/ic/cy.c:1.61 --- src/sys/dev/ic/cy.c:1.60 Sat Nov 15 19:18:18 2014 +++ src/sys/dev/ic/cy.c Sat Oct 28 04:53:55 2017 @@ -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 #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 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); Index: src/sys/dev/ic/dpt.c diff -u src/sys/dev/ic/dpt.c:1.73 src/sys/dev/ic/dpt.c:1.74 --- src/sys/dev/ic/dpt.c:1.73 Thu Jul 7 06:55:41 2016 +++ src/sys/dev/ic/dpt.c Sat Oct 28 04:53:55 2017 @@ -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 #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, Index: src/sys/dev/ic/icp_ioctl.c diff -u src/sys/dev/ic/icp_ioctl.c:1.21 src/sys/dev/ic/icp_ioctl.c:1.22 --- src/sys/dev/ic/icp_ioctl.c:1.21 Fri Jul 25 08:10:37 2014 +++ src/sys/dev/ic/icp_ioctl.c Sat Oct 28 04:53:55 2017 @@ -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, #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 Index: src/sys/dev/ic/joy.c diff -u src/sys/dev/ic/joy.c:1.20 src/sys/dev/ic/joy.c:1.21 --- src/sys/dev/ic/joy.c:1.20 Fri Jul 25 08:10:37 2014 +++ src/sys/dev/ic/joy.c Sat Oct 28 04:53:55 2017 @@ -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 #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 #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); Index: src/sys/dev/ic/lpt.c diff -u src/sys/dev/ic/lpt.c:1.80 src/sys/dev/ic/lpt.c:1.81 --- src/sys/dev/ic/lpt.c:1.80 Fri Jul 25 08:10:37 2014 +++ src/sys/dev/ic/lpt.c Sat Oct 28 04:53:55 2017 @@ -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 #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 int lptdebug = 0; #endif -extern struct cfdriver lpt_cd; - dev_type_open(lptopen); dev_type_close(lptclose); dev_type_write(lptwrite); Index: src/sys/dev/ic/mb89352.c diff -u src/sys/dev/ic/mb89352.c:1.55 src/sys/dev/ic/mb89352.c:1.56 --- src/sys/dev/ic/mb89352.c:1.55 Wed Jan 11 07:16:48 2017 +++ src/sys/dev/ic/mb89352.c Sat Oct 28 04:53:55 2017 @@ -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 #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 ++) */ Index: src/sys/dev/ic/mlx.c diff -u src/sys/dev/ic/mlx.c:1.65 src/sys/dev/ic/mlx.c:1.66 --- src/sys/dev/ic/mlx.c:1.65 Tue Sep 27 03:33:32 2016 +++ src/sys/dev/ic/mlx.c Sat Oct 28 04:53:55 2017 @@ -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 #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; Index: src/sys/dev/ic/nvme.c diff -u src/sys/dev/ic/nvme.c:1.30 src/sys/dev/ic/nvme.c:1.31 --- src/sys/dev/ic/nvme.c:1.30 Thu Jun 1 02:45:10 2017 +++ src/sys/dev/ic/nvme.c Sat Oct 28 04:53:55 2017 @@ -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.3 #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. */ Index: src/sys/dev/ic/rrunner.c diff -u src/sys/dev/ic/rrunner.c:1.84 src/sys/dev/ic/rrunner.c:1.85 --- src/sys/dev/ic/rrunner.c:1.84 Sun Aug 20 11:00:30 2017 +++ src/sys/dev/ic/rrunner.c Sat Oct 28 04:53:55 2017 @@ -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 #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