diff options
| author | plunky <plunky@NetBSD.org> | 2012-04-09 10:18:16 +0000 |
|---|---|---|
| committer | plunky <plunky@NetBSD.org> | 2012-04-09 10:18:16 +0000 |
| commit | 6ffe46e4b5ef02387f9daf64dd31386e5b7a5e17 (patch) | |
| tree | cd4a5b5edb6712f3043d86baa2c04c05dff36c1c /sys/dev | |
| parent | 483fe891dd7a4aba4cce52d0db66d93d1a7b776b (diff) | |
Tidy up a little, the way that midi attachment code works
- change midi_attach() to omit the 'parent' arg (there are
only two callers of this and it is not used)
- change midisyn_attach() to midisyn_init(), so not needing a midi_softc,
and fix the midi_pcppi driver to set hw_if and hw_hdl directly in
its midi_softc before calling midi_attach()
- add a device_t to opl_softc structure, change opl drivers to store
the device 'self' in opl_softc and fix opl_attach() to use this
opl_softc->dev field directly rather than a field in an otherwise
unused midi_softc
- remove unnecessary midi_softc from opl and cms drivers (child device
provides that)
reviewed by mrg
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ic/opl.c | 15 | ||||
| -rw-r--r-- | sys/dev/ic/oplvar.h | 4 | ||||
| -rw-r--r-- | sys/dev/isa/cms.c | 20 | ||||
| -rw-r--r-- | sys/dev/isa/midi_pcppi.c | 16 | ||||
| -rw-r--r-- | sys/dev/isa/opl_ess.c | 6 | ||||
| -rw-r--r-- | sys/dev/isa/opl_isa.c | 6 | ||||
| -rw-r--r-- | sys/dev/isa/opl_sb.c | 6 | ||||
| -rw-r--r-- | sys/dev/isa/opl_wss.c | 6 | ||||
| -rw-r--r-- | sys/dev/isa/opl_ym.c | 6 | ||||
| -rw-r--r-- | sys/dev/midi.c | 16 | ||||
| -rw-r--r-- | sys/dev/midi_if.h | 4 | ||||
| -rw-r--r-- | sys/dev/midisyn.c | 19 | ||||
| -rw-r--r-- | sys/dev/midisynvar.h | 6 | ||||
| -rw-r--r-- | sys/dev/pci/opl_cmpci.c | 6 | ||||
| -rw-r--r-- | sys/dev/pci/opl_eso.c | 6 | ||||
| -rw-r--r-- | sys/dev/pci/opl_fms.c | 6 | ||||
| -rw-r--r-- | sys/dev/pci/opl_sv.c | 6 | ||||
| -rw-r--r-- | sys/dev/pci/opl_yds.c | 6 | ||||
| -rw-r--r-- | sys/dev/sequencer.c | 5 |
19 files changed, 72 insertions, 93 deletions
diff --git a/sys/dev/ic/opl.c b/sys/dev/ic/opl.c index dd67be7f905..1fd4c2da352 100644 --- a/sys/dev/ic/opl.c +++ b/sys/dev/ic/opl.c @@ -1,4 +1,4 @@ -/* $NetBSD: opl.c,v 1.38 2011/11/23 23:07:32 jmcneill Exp $ */ +/* $NetBSD: opl.c,v 1.39 2012/04/09 10:18:16 plunky Exp $ */ /* * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: opl.c,v 1.38 2011/11/23 23:07:32 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: opl.c,v 1.39 2012/04/09 10:18:16 plunky Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -142,9 +142,8 @@ opl_attach(struct opl_softc *sc) { int i; - if (sc->lock == NULL) { - panic("opl_attach: no lock"); - } + KASSERT(sc->dev != NULL); + KASSERT(sc->lock != NULL); mutex_enter(sc->lock); i = opl_find(sc); @@ -164,7 +163,7 @@ opl_attach(struct opl_softc *sc) sc->syn.data = sc; sc->syn.nvoice = sc->model == OPL_2 ? OPL2_NVOICE : OPL3_NVOICE; sc->syn.lock = sc->lock; - midisyn_attach(&sc->mididev, &sc->syn); + midisyn_init(&sc->syn); /* Set up voice table */ for (i = 0; i < OPL3_NVOICE; i++) @@ -176,7 +175,7 @@ opl_attach(struct opl_softc *sc) sc->panl = OPL_VOICE_TO_LEFT; sc->panr = OPL_VOICE_TO_RIGHT; if (sc->model == OPL_3 && - device_cfdata(sc->mididev.dev)->cf_flags & OPL_FLAGS_SWAP_LR) { + device_cfdata(sc->dev)->cf_flags & OPL_FLAGS_SWAP_LR) { sc->panl = OPL_VOICE_TO_RIGHT; sc->panr = OPL_VOICE_TO_LEFT; aprint_normal(": LR swapped"); @@ -186,7 +185,7 @@ opl_attach(struct opl_softc *sc) aprint_naive("\n"); sc->sc_mididev = - midi_attach_mi(&midisyn_hw_if, &sc->syn, sc->mididev.dev); + midi_attach_mi(&midisyn_hw_if, &sc->syn, sc->dev); } int diff --git a/sys/dev/ic/oplvar.h b/sys/dev/ic/oplvar.h index 43a41ae58ec..b02dad02374 100644 --- a/sys/dev/ic/oplvar.h +++ b/sys/dev/ic/oplvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: oplvar.h,v 1.16 2011/11/23 23:07:32 jmcneill Exp $ */ +/* $NetBSD: oplvar.h,v 1.17 2012/04/09 10:18:16 plunky Exp $ */ /* * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ struct opl_voice { }; struct opl_softc { - struct midi_softc mididev; + device_t dev; bus_space_tag_t iot; bus_space_handle_t ioh; kmutex_t *lock; diff --git a/sys/dev/isa/cms.c b/sys/dev/isa/cms.c index 0f51884dcc9..5377687a4cc 100644 --- a/sys/dev/isa/cms.c +++ b/sys/dev/isa/cms.c @@ -1,4 +1,4 @@ -/* $NetBSD: cms.c,v 1.20 2011/11/24 16:11:02 jakllsch Exp $ */ +/* $NetBSD: cms.c,v 1.21 2012/04/09 10:18:16 plunky Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cms.c,v 1.20 2011/11/24 16:11:02 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cms.c,v 1.21 2012/04/09 10:18:16 plunky Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -58,8 +58,6 @@ int cmsdebug = 0; #endif struct cms_softc { - struct midi_softc sc_mididev; - kmutex_t sc_lock; bus_space_tag_t sc_iot; @@ -165,9 +163,7 @@ cms_attach(device_t parent, device_t self, void *aux) bus_space_tag_t iot; bus_space_handle_t ioh; midisyn *ms; - struct audio_attach_args arg; - sc->sc_mididev.dev = self; mutex_init(&sc->sc_lock, MUTEX_DEFAULT, IPL_AUDIO); aprint_normal("\n"); @@ -187,21 +183,17 @@ cms_attach(device_t parent, device_t self, void *aux) /* now let's reset the chips */ cms_reset(sc); + /* init the synthesiser */ ms = &sc->sc_midisyn; ms->mets = &midi_cms_hw; strcpy(ms->name, "Creative Music System"); ms->nvoice = CMS_NVOICES; ms->data = sc; ms->lock = &sc->sc_lock; + midisyn_init(ms); - /* use the synthesiser */ - midisyn_attach(&sc->sc_mididev, ms); - - /* now attach the midi device to the synthesiser */ - arg.type = AUDIODEV_TYPE_MIDI; - arg.hwif = sc->sc_mididev.hw_if; - arg.hdl = sc->sc_mididev.hw_hdl; - config_found(self, &arg, 0); + /* and attach the midi device with the synthesiser */ + midi_attach_mi(&midisyn_hw_if, ms, self); } diff --git a/sys/dev/isa/midi_pcppi.c b/sys/dev/isa/midi_pcppi.c index b49e33369e7..8bf20f56428 100644 --- a/sys/dev/isa/midi_pcppi.c +++ b/sys/dev/isa/midi_pcppi.c @@ -1,4 +1,4 @@ -/* $NetBSD: midi_pcppi.c,v 1.25 2012/04/05 20:13:35 plunky Exp $ */ +/* $NetBSD: midi_pcppi.c,v 1.26 2012/04/09 10:18:17 plunky Exp $ */ /* * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: midi_pcppi.c,v 1.25 2012/04/05 20:13:35 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: midi_pcppi.c,v 1.26 2012/04/09 10:18:17 plunky Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -94,18 +94,20 @@ midi_pcppi_attach(device_t parent, device_t self, void *aux) struct pcppi_attach_args *pa = (struct pcppi_attach_args *)aux; midisyn *ms; - sc->sc_mididev.dev = self; + midi_pcppi_attached++; + ms = &sc->sc_midisyn; ms->mets = &midi_pcppi_hw; strcpy(ms->name, "PC speaker"); ms->nvoice = 1; ms->data = pa->pa_cookie; ms->lock = &tty_lock; + midisyn_init(ms); - midi_pcppi_attached++; - - midisyn_attach(&sc->sc_mididev, ms); - midi_attach(&sc->sc_mididev, parent); + sc->sc_mididev.dev = self; + sc->sc_mididev.hw_if = &midisyn_hw_if; + sc->sc_mididev.hw_hdl = ms; + midi_attach(&sc->sc_mididev); } static int diff --git a/sys/dev/isa/opl_ess.c b/sys/dev/isa/opl_ess.c index 9c3ae17383f..fdb1fb28f4e 100644 --- a/sys/dev/isa/opl_ess.c +++ b/sys/dev/isa/opl_ess.c @@ -1,4 +1,4 @@ -/* $NetBSD: opl_ess.c,v 1.17 2011/11/23 23:07:32 jmcneill Exp $ */ +/* $NetBSD: opl_ess.c,v 1.18 2012/04/09 10:18:17 plunky Exp $ */ /*- * Copyright (c) 1999, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: opl_ess.c,v 1.17 2011/11/23 23:07:32 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: opl_ess.c,v 1.18 2012/04/09 10:18:17 plunky Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -79,7 +79,7 @@ opl_ess_attach(device_t parent, device_t self, void *aux) struct ess_softc *ssc = device_private(parent); struct opl_softc *sc = device_private(self); - sc->mididev.dev = self; + sc->dev = self; sc->ioh = ssc->sc_ioh; sc->iot = ssc->sc_iot; sc->offs = 0; diff --git a/sys/dev/isa/opl_isa.c b/sys/dev/isa/opl_isa.c index ccc2a3dde6c..47ce1944397 100644 --- a/sys/dev/isa/opl_isa.c +++ b/sys/dev/isa/opl_isa.c @@ -1,4 +1,4 @@ -/* $NetBSD: opl_isa.c,v 1.20 2011/11/23 23:07:32 jmcneill Exp $ */ +/* $NetBSD: opl_isa.c,v 1.21 2012/04/09 10:18:17 plunky Exp $ */ /*- * Copyright (c) 1999, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: opl_isa.c,v 1.20 2011/11/23 23:07:32 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: opl_isa.c,v 1.21 2012/04/09 10:18:17 plunky Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -105,7 +105,7 @@ opl_isa_attach(device_t parent, device_t self, void *aux) struct opl_isa_softc *isa = device_private(self); struct isa_attach_args *ia = aux; - sc->mididev.dev = self; + sc->dev = self; sc->iot = ia->ia_iot; if (bus_space_map(sc->iot, ia->ia_io[0].ir_addr, OPL_SIZE, diff --git a/sys/dev/isa/opl_sb.c b/sys/dev/isa/opl_sb.c index bb7d72b0018..e3bbe02252e 100644 --- a/sys/dev/isa/opl_sb.c +++ b/sys/dev/isa/opl_sb.c @@ -1,4 +1,4 @@ -/* $NetBSD: opl_sb.c,v 1.19 2011/11/23 23:07:32 jmcneill Exp $ */ +/* $NetBSD: opl_sb.c,v 1.20 2012/04/09 10:18:17 plunky Exp $ */ /* * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: opl_sb.c,v 1.19 2011/11/23 23:07:32 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: opl_sb.c,v 1.20 2012/04/09 10:18:17 plunky Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -77,7 +77,7 @@ opl_sb_attach(device_t parent, device_t self, void *aux) struct sbdsp_softc *ssc = device_private(parent); struct opl_softc *sc = device_private(self); - sc->mididev.dev = self; + sc->dev = self; sc->ioh = ssc->sc_ioh; sc->iot = ssc->sc_iot; sc->offs = 0; diff --git a/sys/dev/isa/opl_wss.c b/sys/dev/isa/opl_wss.c index cab446c5f40..55947ef565b 100644 --- a/sys/dev/isa/opl_wss.c +++ b/sys/dev/isa/opl_wss.c @@ -1,4 +1,4 @@ -/* $NetBSD: opl_wss.c,v 1.14 2011/12/07 17:38:50 jakllsch Exp $ */ +/* $NetBSD: opl_wss.c,v 1.15 2012/04/09 10:18:17 plunky Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: opl_wss.c,v 1.14 2011/12/07 17:38:50 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: opl_wss.c,v 1.15 2012/04/09 10:18:17 plunky Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -77,7 +77,7 @@ opl_wss_attach(device_t parent, device_t self, void *aux) struct wss_softc *ssc = device_private(parent); struct opl_softc *sc = device_private(self); - sc->mididev.dev = self; + sc->dev = self; sc->ioh = ssc->sc_opl_ioh; sc->iot = ssc->sc_iot; sc->offs = 0; diff --git a/sys/dev/isa/opl_ym.c b/sys/dev/isa/opl_ym.c index 0f40636baa6..8d95df022af 100644 --- a/sys/dev/isa/opl_ym.c +++ b/sys/dev/isa/opl_ym.c @@ -1,4 +1,4 @@ -/* $NetBSD: opl_ym.c,v 1.17 2011/12/07 17:38:50 jakllsch Exp $ */ +/* $NetBSD: opl_ym.c,v 1.18 2012/04/09 10:18:17 plunky Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: opl_ym.c,v 1.17 2011/12/07 17:38:50 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: opl_ym.c,v 1.18 2012/04/09 10:18:17 plunky Exp $"); #include "mpu_ym.h" @@ -83,7 +83,7 @@ opl_ym_attach(device_t parent, device_t self, void *aux) struct ym_softc *ssc = device_private(parent); struct opl_softc *sc = device_private(self); - sc->mididev.dev = self; + sc->dev = self; sc->ioh = ssc->sc_opl_ioh; sc->iot = ssc->sc_iot; sc->offs = 0; diff --git a/sys/dev/midi.c b/sys/dev/midi.c index 576d292ec3a..4162f608813 100644 --- a/sys/dev/midi.c +++ b/sys/dev/midi.c @@ -1,4 +1,4 @@ -/* $NetBSD: midi.c,v 1.77 2012/04/05 20:25:53 plunky Exp $ */ +/* $NetBSD: midi.c,v 1.78 2012/04/09 10:18:16 plunky 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.77 2012/04/05 20:25:53 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: midi.c,v 1.78 2012/04/09 10:18:16 plunky Exp $"); #include "midi.h" #include "sequencer.h" @@ -137,13 +137,11 @@ midiprobe(device_t parent, cfdata_t match, void *aux) static void midiattach(device_t parent, device_t self, void *aux) { - struct midi_softc *sc; - struct audio_attach_args *sa; + struct midi_softc *sc = device_private(self); + struct audio_attach_args *sa = aux; const struct midi_hw_if *hwp; void *hdlp; - sc = device_private(self); - sa = aux; hwp = sa->hwif; hdlp = sa->hdl; @@ -165,7 +163,7 @@ midiattach(device_t parent, device_t self, void *aux) sc->dev = self; sc->hw_if = hwp; sc->hw_hdl = hdlp; - midi_attach(sc, parent); + midi_attach(sc); } static int @@ -235,7 +233,7 @@ mididetach(device_t self, int flags) } void -midi_attach(struct midi_softc *sc, device_t parent) +midi_attach(struct midi_softc *sc) { struct midi_info mi; kmutex_t *dummy; @@ -1769,8 +1767,6 @@ midi_register_hw_if_ext(struct midi_hw_if_ext *exthw) #if NMIDI > 0 || NMIDIBUS > 0 -int audioprint(void *, const char *); - device_t midi_attach_mi(const struct midi_hw_if *mhwp, void *hdlp, device_t dev) { diff --git a/sys/dev/midi_if.h b/sys/dev/midi_if.h index 59002059472..6549ece0a89 100644 --- a/sys/dev/midi_if.h +++ b/sys/dev/midi_if.h @@ -1,4 +1,4 @@ -/* $NetBSD: midi_if.h,v 1.24 2011/11/24 21:59:35 mrg Exp $ */ +/* $NetBSD: midi_if.h,v 1.25 2012/04/09 10:18:16 plunky Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -102,7 +102,7 @@ struct midi_hw_if_ext { }; void midi_register_hw_if_ext(struct midi_hw_if_ext *); -void midi_attach(struct midi_softc *, device_t); +void midi_attach(struct midi_softc *); int mididetach(device_t, int); device_t midi_attach_mi(const struct midi_hw_if *, void *, device_t); diff --git a/sys/dev/midisyn.c b/sys/dev/midisyn.c index fdc05728a6f..35f4f1ec33c 100644 --- a/sys/dev/midisyn.c +++ b/sys/dev/midisyn.c @@ -1,4 +1,4 @@ -/* $NetBSD: midisyn.c,v 1.23 2011/11/23 23:07:31 jmcneill Exp $ */ +/* $NetBSD: midisyn.c,v 1.24 2012/04/09 10:18:16 plunky Exp $ */ /* * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: midisyn.c,v 1.23 2011/11/23 23:07:31 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: midisyn.c,v 1.24 2012/04/09 10:18:16 plunky Exp $"); #include <sys/param.h> #include <sys/ioctl.h> @@ -133,10 +133,7 @@ midisyn_open(void *addr, int flags, void (*iintr)(void *, int), int rslt, error; uint_fast8_t chan; - if (ms->lock == NULL) { - panic("midisyn_open: no lock"); - } - + KASSERT(ms->lock != NULL); KASSERT(mutex_owned(ms->lock)); DPRINTF(("midisyn_open: ms=%p ms->mets=%p\n", ms, ms->mets)); @@ -250,12 +247,10 @@ midisyn_findvoice(midisyn *ms, int chan, int note) } void -midisyn_attach(struct midi_softc *sc, midisyn *ms) +midisyn_init(midisyn *ms) { - if (ms->lock == NULL) { - panic("midisyn_attach: no lock"); - } + KASSERT(ms->lock != NULL); /* * XXX there should be a way for this function to indicate failure @@ -278,9 +273,7 @@ midisyn_attach(struct midi_softc *sc, midisyn *ms) .notify = midisyn_notify }; - sc->hw_if = &midisyn_hw_if; - sc->hw_hdl = ms; - DPRINTF(("midisyn_attach: ms=%p\n", sc->hw_hdl)); + DPRINTF(("midisyn_init: ms=%p\n", ms)); } static void diff --git a/sys/dev/midisynvar.h b/sys/dev/midisynvar.h index d16a0e4a670..2055ce7eea3 100644 --- a/sys/dev/midisynvar.h +++ b/sys/dev/midisynvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: midisynvar.h,v 1.13 2011/11/23 23:07:31 jmcneill Exp $ */ +/* $NetBSD: midisynvar.h,v 1.14 2012/04/09 10:18:16 plunky Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -184,11 +184,9 @@ struct midisyn { #define MS_GETPGM(ms, vno) ((ms)->pgms[MS_GETCHAN(&(ms)->voices[vno])]) -struct midi_softc; - extern const struct midi_hw_if midisyn_hw_if; -void midisyn_attach (struct midi_softc *, midisyn *); +void midisyn_init(midisyn *); /* * Convert a 14-bit volume or expression controller value to centibels using diff --git a/sys/dev/pci/opl_cmpci.c b/sys/dev/pci/opl_cmpci.c index f5958568016..1af65ede568 100644 --- a/sys/dev/pci/opl_cmpci.c +++ b/sys/dev/pci/opl_cmpci.c @@ -1,4 +1,4 @@ -/* $NetBSD: opl_cmpci.c,v 1.16 2011/12/07 17:38:50 jakllsch Exp $ */ +/* $NetBSD: opl_cmpci.c,v 1.17 2012/04/09 10:18:17 plunky Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: opl_cmpci.c,v 1.16 2011/12/07 17:38:50 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: opl_cmpci.c,v 1.17 2012/04/09 10:18:17 plunky Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -73,7 +73,7 @@ opl_cmpci_attach(device_t parent, device_t self, void *aux) struct cmpci_softc *ssc = device_private(parent); struct opl_softc *sc = device_private(self); - sc->mididev.dev = self; + sc->dev = self; sc->ioh = ssc->sc_ioh; sc->iot = ssc->sc_iot; sc->offs = CMPCI_REG_FM_BASE; diff --git a/sys/dev/pci/opl_eso.c b/sys/dev/pci/opl_eso.c index 85ca4ced1fd..3040a0d0928 100644 --- a/sys/dev/pci/opl_eso.c +++ b/sys/dev/pci/opl_eso.c @@ -1,4 +1,4 @@ -/* $NetBSD: opl_eso.c,v 1.17 2011/11/23 23:07:36 jmcneill Exp $ */ +/* $NetBSD: opl_eso.c,v 1.18 2012/04/09 10:18:17 plunky Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: opl_eso.c,v 1.17 2011/11/23 23:07:36 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: opl_eso.c,v 1.18 2012/04/09 10:18:17 plunky Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -72,7 +72,7 @@ opl_eso_attach(device_t parent, device_t self, void *aux) struct eso_softc *esc = device_private(parent); struct opl_softc *sc = device_private(self); - sc->mididev.dev = self; + sc->dev = self; sc->ioh = esc->sc_sb_ioh; sc->iot = esc->sc_sb_iot; sc->offs = 0; diff --git a/sys/dev/pci/opl_fms.c b/sys/dev/pci/opl_fms.c index 02dcd88f31d..e62a9fe2ec8 100644 --- a/sys/dev/pci/opl_fms.c +++ b/sys/dev/pci/opl_fms.c @@ -1,4 +1,4 @@ -/* $NetBSD: opl_fms.c,v 1.16 2011/12/07 17:38:50 jakllsch Exp $ */ +/* $NetBSD: opl_fms.c,v 1.17 2012/04/09 10:18:17 plunky Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: opl_fms.c,v 1.16 2011/12/07 17:38:50 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: opl_fms.c,v 1.17 2012/04/09 10:18:17 plunky Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -73,7 +73,7 @@ opl_fms_attach(device_t parent, device_t self, void *aux) struct fms_softc *ssc = device_private(parent); struct opl_softc *sc = device_private(self); - sc->mididev.dev = self; + sc->dev = self; sc->ioh = ssc->sc_opl_ioh; sc->iot = ssc->sc_iot; sc->offs = 0; diff --git a/sys/dev/pci/opl_sv.c b/sys/dev/pci/opl_sv.c index 5b6650ea7da..48ae659e8b2 100644 --- a/sys/dev/pci/opl_sv.c +++ b/sys/dev/pci/opl_sv.c @@ -1,4 +1,4 @@ -/* $NetBSD: opl_sv.c,v 1.15 2011/12/07 17:38:50 jakllsch Exp $ */ +/* $NetBSD: opl_sv.c,v 1.16 2012/04/09 10:18:17 plunky Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: opl_sv.c,v 1.15 2011/12/07 17:38:50 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: opl_sv.c,v 1.16 2012/04/09 10:18:17 plunky Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -72,7 +72,7 @@ opl_sv_attach(device_t parent, device_t self, void *aux) struct sv_softc *ssc = device_private(parent); struct opl_softc *sc = device_private(self); - sc->mididev.dev = self; + sc->dev = self; sc->ioh = ssc->sc_oplioh; sc->iot = ssc->sc_opliot; sc->offs = 0; diff --git a/sys/dev/pci/opl_yds.c b/sys/dev/pci/opl_yds.c index 6a0ac3b460f..eab3695c05f 100644 --- a/sys/dev/pci/opl_yds.c +++ b/sys/dev/pci/opl_yds.c @@ -1,4 +1,4 @@ -/* $NetBSD: opl_yds.c,v 1.16 2011/12/07 17:38:50 jakllsch Exp $ */ +/* $NetBSD: opl_yds.c,v 1.17 2012/04/09 10:18:17 plunky Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: opl_yds.c,v 1.16 2011/12/07 17:38:50 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: opl_yds.c,v 1.17 2012/04/09 10:18:17 plunky Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -75,7 +75,7 @@ opl_yds_attach(device_t parent, device_t self, void *aux) struct yds_softc *ssc = device_private(parent); struct opl_softc *sc = device_private(self); - sc->mididev.dev = self; + sc->dev = self; sc->ioh = ssc->sc_opl_ioh; sc->iot = ssc->sc_opl_iot; sc->offs = 0; diff --git a/sys/dev/sequencer.c b/sys/dev/sequencer.c index 9ae3579aafd..0d2d0af5d8d 100644 --- a/sys/dev/sequencer.c +++ b/sys/dev/sequencer.c @@ -1,4 +1,4 @@ -/* $NetBSD: sequencer.c,v 1.54 2012/02/13 01:47:16 mrg Exp $ */ +/* $NetBSD: sequencer.c,v 1.55 2012/04/09 10:18:16 plunky 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.54 2012/02/13 01:47:16 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sequencer.c,v 1.55 2012/04/09 10:18:16 plunky Exp $"); #include "sequencer.h" @@ -136,7 +136,6 @@ static void seq_timeout(void *); static int seq_to_new(seq_event_t *, struct uio *); static void seq_softintr(void *); -struct midi_softc; static int midiseq_out(struct midi_dev *, u_char *, u_int, int); static struct midi_dev *midiseq_open(int, int); static void midiseq_close(struct midi_dev *); |
