Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Kill some more extern cfdriver xyz_cd in favour of #...
details: https://anonhg.NetBSD.org/src/rev/15d0e79650c9
branches: trunk
changeset: 357124:15d0e79650c9
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sat Oct 28 03:47:24 2017 +0000
description:
Kill some more extern cfdriver xyz_cd in favour of #include "ioconf.h".
diffstat:
sys/dev/cgd.c | 5 ++---
sys/dev/fss.c | 5 ++---
sys/dev/ld.c | 8 ++++----
sys/dev/md.c | 5 ++---
sys/dev/midi.c | 9 ++++-----
sys/dev/radio.c | 8 ++++----
sys/dev/sequencer.c | 10 ++--------
sys/dev/spkr.c | 8 ++++----
sys/dev/video.c | 8 ++++----
sys/dev/vnd.c | 5 ++---
10 files changed, 30 insertions(+), 41 deletions(-)
diffs (truncated from 351 to 300 lines):
diff -r 52d40e6fd451 -r 15d0e79650c9 sys/dev/cgd.c
--- a/sys/dev/cgd.c Sat Oct 28 03:34:26 2017 +0000
+++ b/sys/dev/cgd.c Sat Oct 28 03:47:24 2017 +0000
@@ -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 @@
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 -r 52d40e6fd451 -r 15d0e79650c9 sys/dev/fss.c
--- a/sys/dev/fss.c Sat Oct 28 03:34:26 2017 +0000
+++ b/sys/dev/fss.c Sat Oct 28 03:47:24 2017 +0000
@@ -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 @@
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 -r 52d40e6fd451 -r 15d0e79650c9 sys/dev/ld.c
--- a/sys/dev/ld.c Sat Oct 28 03:34:26 2017 +0000
+++ b/sys/dev/ld.c Sat Oct 28 03:47:24 2017 +0000
@@ -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 @@
#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_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 -r 52d40e6fd451 -r 15d0e79650c9 sys/dev/md.c
--- a/sys/dev/md.c Sat Oct 28 03:34:26 2017 +0000
+++ b/sys/dev/md.c Sat Oct 28 03:47:24 2017 +0000
@@ -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 @@
.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 -r 52d40e6fd451 -r 15d0e79650c9 sys/dev/midi.c
--- a/sys/dev/midi.c Sat Oct 28 03:34:26 2017 +0000
+++ b/sys/dev/midi.c Sat Oct 28 03:47:24 2017 +0000
@@ -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 @@
#include <dev/midi_if.h>
#include <dev/midivar.h>
+#include "ioconf.h"
+
#if NMIDI > 0
#ifdef AUDIO_DEBUG
@@ -132,8 +134,6 @@
#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 @@
#endif /* NMIDI > 0 || NMIDIBUS > 0 */
#ifdef _MODULE
-extern struct cfdriver midi_cd;
#include "ioconf.c"
devmajor_t midi_bmajor = -1, midi_cmajor = -1;
diff -r 52d40e6fd451 -r 15d0e79650c9 sys/dev/radio.c
--- a/sys/dev/radio.c Sat Oct 28 03:34:26 2017 +0000
+++ b/sys/dev/radio.c Sat Oct 28 03:47:24 2017 +0000
@@ -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 @@
#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 @@
.d_flag = D_OTHER,
};
-extern struct cfdriver radio_cd;
-
static int
radioprobe(device_t parent, cfdata_t match, void *aux)
{
diff -r 52d40e6fd451 -r 15d0e79650c9 sys/dev/sequencer.c
--- a/sys/dev/sequencer.c Sat Oct 28 03:34:26 2017 +0000
+++ b/sys/dev/sequencer.c Sat Oct 28 03:47:24 2017 +0000
@@ -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 @@
/* 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 @@
}
/* 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 @@
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 @@
#endif /* NMIDI == 0 */
#ifdef _MODULE
-extern struct cfdriver sequencer_cd;
#include "ioconf.c"
devmajor_t sequencer_bmajor = -1, sequencer_cmajor = -1;
diff -r 52d40e6fd451 -r 15d0e79650c9 sys/dev/spkr.c
--- a/sys/dev/spkr.c Sat Oct 28 03:34:26 2017 +0000
+++ b/sys/dev/spkr.c Sat Oct 28 03:47:24 2017 +0000
@@ -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@localhost)
@@ -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 @@
#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 @@
* 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 @@
}
#ifdef _MODULE
-extern struct cfdriver spkr_cd;
#include "ioconf.c"
#endif
diff -r 52d40e6fd451 -r 15d0e79650c9 sys/dev/video.c
--- a/sys/dev/video.c Sat Oct 28 03:34:26 2017 +0000
+++ b/sys/dev/video.c Sat Oct 28 03:47:24 2017 +0000
@@ -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@localhost>
@@ -36,7 +36,7 @@
*/
Home |
Main Index |
Thread Index |
Old Index