summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorriastradh <riastradh@NetBSD.org>2017-10-28 03:47:24 +0000
committerriastradh <riastradh@NetBSD.org>2017-10-28 03:47:24 +0000
commit14274eae2b89673b6d1a8e48c4a2eb8a6ab13c6e (patch)
treee7a2bee8f01e624433b2529726c1f2ec355ef1d2 /sys/dev
parente0359ae96acb69cf88717e3e5e29d221b8c95280 (diff)
Kill some more extern cfdriver xyz_cd in favour of #include "ioconf.h".
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/cgd.c5
-rw-r--r--sys/dev/fss.c5
-rw-r--r--sys/dev/ld.c8
-rw-r--r--sys/dev/md.c5
-rw-r--r--sys/dev/midi.c9
-rw-r--r--sys/dev/radio.c8
-rw-r--r--sys/dev/sequencer.c10
-rw-r--r--sys/dev/spkr.c8
-rw-r--r--sys/dev/video.c8
-rw-r--r--sys/dev/vnd.c5
10 files changed, 30 insertions, 41 deletions
diff --git a/sys/dev/cgd.c b/sys/dev/cgd.c
index 89447c1e346..c8b63edc52f 100644
--- a/sys/dev/cgd.c
+++ b/sys/dev/cgd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cgd.c,v 1.114 2017/02/27 21:25:45 jdolecek Exp $ */
+/* $NetBSD: cgd.c,v 1.115 2017/10/28 03:47:24 riastradh Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.114 2017/02/27 21:25:45 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.115 2017/10/28 03:47:24 riastradh Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -236,7 +236,6 @@ static struct dkdriver cgddkdriver = {
CFATTACH_DECL3_NEW(cgd, sizeof(struct cgd_softc),
cgd_match, cgd_attach, cgd_detach, NULL, NULL, NULL, DVF_DETACH_SHUTDOWN);
-extern struct cfdriver cgd_cd;
/* DIAGNOSTIC and DEBUG definitions */
diff --git a/sys/dev/fss.c b/sys/dev/fss.c
index 999050030a1..8471583da9d 100644
--- a/sys/dev/fss.c
+++ b/sys/dev/fss.c
@@ -1,4 +1,4 @@
-/* $NetBSD: fss.c,v 1.98 2017/06/01 02:45:09 chs Exp $ */
+/* $NetBSD: fss.c,v 1.99 2017/10/28 03:47:24 riastradh Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.98 2017/06/01 02:45:09 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.99 2017/10/28 03:47:24 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -130,7 +130,6 @@ static int fss_detach(device_t, int);
CFATTACH_DECL_NEW(fss, sizeof(struct fss_softc),
fss_match, fss_attach, fss_detach, NULL);
-extern struct cfdriver fss_cd;
void
fssattach(int num)
diff --git a/sys/dev/ld.c b/sys/dev/ld.c
index 20795a0af77..b55c613a3d1 100644
--- a/sys/dev/ld.c
+++ b/sys/dev/ld.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ld.c,v 1.103 2017/08/20 15:58:43 mlelstv Exp $ */
+/* $NetBSD: ld.c,v 1.104 2017/10/28 03:47:24 riastradh Exp $ */
/*-
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.103 2017/08/20 15:58:43 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.104 2017/10/28 03:47:24 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -59,6 +59,8 @@ __KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.103 2017/08/20 15:58:43 mlelstv Exp $");
#include <dev/ldvar.h>
+#include "ioconf.h"
+
static void ldminphys(struct buf *bp);
static bool ld_suspend(device_t, const pmf_qual_t *);
static bool ld_shutdown(device_t, int);
@@ -72,8 +74,6 @@ static int ld_lastclose(device_t);
static int ld_discard(device_t, off_t, off_t);
static int ld_flush(device_t, bool);
-extern struct cfdriver ld_cd;
-
static dev_type_open(ldopen);
static dev_type_close(ldclose);
static dev_type_read(ldread);
diff --git a/sys/dev/md.c b/sys/dev/md.c
index d8f88d5f205..b3aed8c53ae 100644
--- a/sys/dev/md.c
+++ b/sys/dev/md.c
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.78 2016/07/27 05:14:40 pgoyette Exp $ */
+/* $NetBSD: md.c,v 1.79 2017/10/28 03:47:24 riastradh Exp $ */
/*
* Copyright (c) 1995 Gordon W. Ross, Leo Weppelman.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.78 2016/07/27 05:14:40 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.79 2017/10/28 03:47:24 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_md.h"
@@ -135,7 +135,6 @@ static struct dkdriver mddkdriver = {
.d_strategy = mdstrategy
};
-extern struct cfdriver md_cd;
CFATTACH_DECL3_NEW(md, sizeof(struct md_softc),
0, md_attach, md_detach, NULL, NULL, NULL, DVF_DETACH_SHUTDOWN);
diff --git a/sys/dev/midi.c b/sys/dev/midi.c
index a001e8c585f..a69c72805be 100644
--- a/sys/dev/midi.c
+++ b/sys/dev/midi.c
@@ -1,4 +1,4 @@
-/* $NetBSD: midi.c,v 1.87 2017/10/25 08:12:38 maya Exp $ */
+/* $NetBSD: midi.c,v 1.88 2017/10/28 03:47:24 riastradh Exp $ */
/*
* Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: midi.c,v 1.87 2017/10/25 08:12:38 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: midi.c,v 1.88 2017/10/28 03:47:24 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "midi.h"
@@ -61,6 +61,8 @@ __KERNEL_RCSID(0, "$NetBSD: midi.c,v 1.87 2017/10/25 08:12:38 maya Exp $");
#include <dev/midi_if.h>
#include <dev/midivar.h>
+#include "ioconf.h"
+
#if NMIDI > 0
#ifdef AUDIO_DEBUG
@@ -132,8 +134,6 @@ CFATTACH_DECL_NEW(midi, sizeof(struct midi_softc),
#define MIDI_XMT_ASENSE_PERIOD mstohz(275)
#define MIDI_RCV_ASENSE_PERIOD mstohz(300)
-extern struct cfdriver midi_cd;
-
static int
midiprobe(device_t parent, cfdata_t match, void *aux)
{
@@ -1900,7 +1900,6 @@ midi_attach_mi(const struct midi_hw_if *mhwp, void *hdlp, device_t dev)
#endif /* NMIDI > 0 || NMIDIBUS > 0 */
#ifdef _MODULE
-extern struct cfdriver midi_cd;
#include "ioconf.c"
devmajor_t midi_bmajor = -1, midi_cmajor = -1;
diff --git a/sys/dev/radio.c b/sys/dev/radio.c
index 2699e797903..eda8a8e9049 100644
--- a/sys/dev/radio.c
+++ b/sys/dev/radio.c
@@ -1,4 +1,4 @@
-/* $NetBSD: radio.c,v 1.27 2014/07/25 08:10:35 dholland Exp $ */
+/* $NetBSD: radio.c,v 1.28 2017/10/28 03:47:24 riastradh Exp $ */
/* $OpenBSD: radio.c,v 1.2 2001/12/05 10:27:06 mickey Exp $ */
/* $RuOBSD: radio.c,v 1.7 2001/12/04 06:03:05 tm Exp $ */
@@ -30,7 +30,7 @@
/* This is the /dev/radio driver from OpenBSD */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radio.c,v 1.27 2014/07/25 08:10:35 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radio.c,v 1.28 2017/10/28 03:47:24 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -44,6 +44,8 @@ __KERNEL_RCSID(0, "$NetBSD: radio.c,v 1.27 2014/07/25 08:10:35 dholland Exp $");
#include <dev/radio_if.h>
+#include "ioconf.h"
+
struct radio_softc {
void *hw_hdl; /* hardware driver handle */
device_t sc_dev; /* hardware device struct */
@@ -77,8 +79,6 @@ const struct cdevsw radio_cdevsw = {
.d_flag = D_OTHER,
};
-extern struct cfdriver radio_cd;
-
static int
radioprobe(device_t parent, cfdata_t match, void *aux)
{
diff --git a/sys/dev/sequencer.c b/sys/dev/sequencer.c
index 5ec87fe0065..b0423ec547e 100644
--- a/sys/dev/sequencer.c
+++ b/sys/dev/sequencer.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sequencer.c,v 1.67 2017/10/25 08:12:38 maya Exp $ */
+/* $NetBSD: sequencer.c,v 1.68 2017/10/28 03:47:24 riastradh Exp $ */
/*
* Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -55,7 +55,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sequencer.c,v 1.67 2017/10/25 08:12:38 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sequencer.c,v 1.68 2017/10/28 03:47:24 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "sequencer.h"
@@ -355,8 +355,6 @@ sequenceropen(dev_t dev, int flags, int ifmt, struct lwp *l)
/* Only now redirect input from MIDI devices. */
for (mdno = 0; mdno < sc->nmidi; mdno++) {
- extern struct cfdriver midi_cd;
-
msc = device_lookup_private(&midi_cd, sc->devs[mdno]->unit);
if (msc) {
mutex_enter(msc->lock);
@@ -453,8 +451,6 @@ sequencerclose(dev_t dev, int flags, int ifmt, struct lwp *l)
}
/* Bin input from MIDI devices. */
for (unit = 0; unit < sc->nmidi; unit++) {
- extern struct cfdriver midi_cd;
-
msc = device_lookup_private(&midi_cd, unit);
if (msc) {
mutex_enter(msc->lock);
@@ -1407,7 +1403,6 @@ midiseq_in(struct midi_dev *md, u_char *msg, int len)
static struct midi_dev *
midiseq_open(int unit, int flags)
{
- extern struct cfdriver midi_cd;
int error;
struct midi_dev *md;
struct midi_softc *sc;
@@ -1674,7 +1669,6 @@ midi_writebytes(int unit, u_char *bf, int cc)
#endif /* NMIDI == 0 */
#ifdef _MODULE
-extern struct cfdriver sequencer_cd;
#include "ioconf.c"
devmajor_t sequencer_bmajor = -1, sequencer_cmajor = -1;
diff --git a/sys/dev/spkr.c b/sys/dev/spkr.c
index 43b2f5e3a8f..b0b57fbe456 100644
--- a/sys/dev/spkr.c
+++ b/sys/dev/spkr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: spkr.c,v 1.14 2017/07/01 23:27:17 nat Exp $ */
+/* $NetBSD: spkr.c,v 1.15 2017/10/28 03:47:24 riastradh Exp $ */
/*
* Copyright (c) 1990 Eric S. Raymond (esr@snark.thyrsus.com)
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spkr.c,v 1.14 2017/07/01 23:27:17 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spkr.c,v 1.15 2017/10/28 03:47:24 riastradh Exp $");
#if defined(_KERNEL_OPT)
#include "wsmux.h"
@@ -69,6 +69,8 @@ __KERNEL_RCSID(0, "$NetBSD: spkr.c,v 1.14 2017/07/01 23:27:17 nat Exp $");
#include <dev/wscons/wsbellvar.h>
#include <dev/wscons/wsbellmuxvar.h>
+#include "ioconf.h"
+
dev_type_open(spkropen);
dev_type_close(spkrclose);
dev_type_write(spkrwrite);
@@ -356,7 +358,6 @@ playstring(struct spkr_softc *sc, const char *cp, size_t slen)
* This section implements driver hooks to run playstring() and the spkr_tone()
* and spkr_rest() functions defined above.
*/
-extern struct cfdriver spkr_cd;
#define spkrenter(d) device_lookup_private(&spkr_cd, d)
void
@@ -542,7 +543,6 @@ spkrioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
}
#ifdef _MODULE
-extern struct cfdriver spkr_cd;
#include "ioconf.c"
#endif
diff --git a/sys/dev/video.c b/sys/dev/video.c
index 8a0b03b6cbf..34d70d22e9b 100644
--- a/sys/dev/video.c
+++ b/sys/dev/video.c
@@ -1,4 +1,4 @@
-/* $NetBSD: video.c,v 1.33 2017/06/01 02:45:09 chs Exp $ */
+/* $NetBSD: video.c,v 1.34 2017/10/28 03:47:24 riastradh Exp $ */
/*
* Copyright (c) 2008 Patrick Mahoney <pat@polycrystal.org>
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: video.c,v 1.33 2017/06/01 02:45:09 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: video.c,v 1.34 2017/10/28 03:47:24 riastradh Exp $");
#include "video.h"
#if NVIDEO > 0
@@ -58,6 +58,8 @@ __KERNEL_RCSID(0, "$NetBSD: video.c,v 1.33 2017/06/01 02:45:09 chs Exp $");
#include <dev/video_if.h>
+#include "ioconf.h"
+
/* #define VIDEO_DEBUG 1 */
#ifdef VIDEO_DEBUG
@@ -224,8 +226,6 @@ const struct cdevsw video_cdevsw = {
CFATTACH_DECL_NEW(video, sizeof(struct video_softc),
video_match, video_attach, video_detach, video_activate);
-extern struct cfdriver video_cd;
-
static const char * video_pixel_format_str(enum video_pixel_format);
/* convert various values from V4L2 to native values of this driver */
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c
index 6893d50e614..f4de74bf2b2 100644
--- a/sys/dev/vnd.c
+++ b/sys/dev/vnd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vnd.c,v 1.262 2017/07/28 16:30:41 riastradh Exp $ */
+/* $NetBSD: vnd.c,v 1.263 2017/10/28 03:47:24 riastradh Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
@@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.262 2017/07/28 16:30:41 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.263 2017/10/28 03:47:24 riastradh Exp $");
#if defined(_KERNEL_OPT)
#include "opt_vnd.h"
@@ -229,7 +229,6 @@ static int vnd_detach(device_t, int);
CFATTACH_DECL3_NEW(vnd, sizeof(struct vnd_softc),
vnd_match, vnd_attach, vnd_detach, NULL, NULL, NULL, DVF_DETACH_SHUTDOWN);
-extern struct cfdriver vnd_cd;
static struct vnd_softc *vnd_spawn(int);
int vnd_destroy(device_t);