summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>1999-01-01 14:53:31 +0000
committerluigi <luigi@FreeBSD.org>1999-01-01 14:53:31 +0000
commit73e4a133fff6cf238d3f7e334caa356fb22c207e (patch)
tree77d393521ee7f0d631c6fbbfc225ca3563b37e1b
parent779777b4597786f840c7bf050f36a843ad75229b (diff)
downloadFreeBSD-src-73e4a133fff6cf238d3f7e334caa356fb22c207e.zip
FreeBSD-src-73e4a133fff6cf238d3f7e334caa356fb22c207e.tar.gz
unbreak devfs support after wrong cut&paste...
ReportedBy: Louis A. Mamakos
-rw-r--r--sys/i386/isa/snd/sound.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/sys/i386/isa/snd/sound.c b/sys/i386/isa/snd/sound.c
index e9d8379..1cbbe8a 100644
--- a/sys/i386/isa/snd/sound.c
+++ b/sys/i386/isa/snd/sound.c
@@ -239,9 +239,6 @@ pcmattach(struct isa_device * dev)
struct isa_device *dvp;
int stat = 0;
dev_t isadev;
-#ifdef DEVFS
- void *cookie;
-#endif
dev->id_ointr = pcmintr;
@@ -331,7 +328,9 @@ pcmattach(struct isa_device * dev)
int
pcminit(snddev_info *d, int unit)
{
+#ifdef DEVFS
void *cookie;
+#endif
/*
* initialize standard parameters for the device. This can be
@@ -359,33 +358,33 @@ pcminit(snddev_info *d, int unit)
* Make links to first successfully probed unit.
* Attempts by later devices to make these links will fail.
*/
- cookie = devfs_add_devswf(&snd_cdevsw, (dev->id_unit << 4) | SND_DEV_DSP,
- DV_CHR, UID_SND, GID_SND, PERM_SND, "dsp%r", dev->id_unit);
+ cookie = devfs_add_devswf(&snd_cdevsw, (unit << 4) | SND_DEV_DSP,
+ DV_CHR, UID_SND, GID_SND, PERM_SND, "dsp%r", unit);
if (cookie) devfs_makelink(cookie, "dsp");
- cookie = devfs_add_devswf(&snd_cdevsw, (dev->id_unit << 4) | SND_DEV_DSP16,
- DV_CHR, UID_SND, GID_SND, PERM_SND, "dspW%r", dev->id_unit);
+ cookie = devfs_add_devswf(&snd_cdevsw, (unit << 4) | SND_DEV_DSP16,
+ DV_CHR, UID_SND, GID_SND, PERM_SND, "dspW%r", unit);
if (cookie) devfs_makelink(cookie, "dspW");
- cookie = devfs_add_devswf(&snd_cdevsw, (dev->id_unit << 4) | SND_DEV_AUDIO,
- DV_CHR, UID_SND, GID_SND, PERM_SND, "audio%r", dev->id_unit);
+ cookie = devfs_add_devswf(&snd_cdevsw, (unit << 4) | SND_DEV_AUDIO,
+ DV_CHR, UID_SND, GID_SND, PERM_SND, "audio%r", unit);
if (cookie) devfs_makelink(cookie, "audio");
- cookie = devfs_add_devswf(&snd_cdevsw, (dev->id_unit << 4) | SND_DEV_CTL,
- DV_CHR, UID_SND, GID_SND, PERM_SND, "mixer%r", dev->id_unit);
+ cookie = devfs_add_devswf(&snd_cdevsw, (unit << 4) | SND_DEV_CTL,
+ DV_CHR, UID_SND, GID_SND, PERM_SND, "mixer%r", unit);
if (cookie) devfs_makelink(cookie, "mixer");
- cookie = devfs_add_devswf(&snd_cdevsw, (dev->id_unit << 4) | SND_DEV_STATUS,
- DV_CHR, UID_SND, GID_SND, PERM_SND, "sndstat%r", dev->id_unit);
+ cookie = devfs_add_devswf(&snd_cdevsw, (unit << 4) | SND_DEV_STATUS,
+ DV_CHR, UID_SND, GID_SND, PERM_SND, "sndstat%r", unit);
if (cookie) devfs_makelink(cookie, "sndstat");
#if 0 /* these two are still unsupported... */
- cookie = devfs_add_devswf(&snd_cdevsw, (dev->id_unit << 4) | SND_DEV_MIDIN,
- DV_CHR, UID_SND, GID_SND, PERM_SND, "midi%r", dev->id_unit);
+ cookie = devfs_add_devswf(&snd_cdevsw, (unit << 4) | SND_DEV_MIDIN,
+ DV_CHR, UID_SND, GID_SND, PERM_SND, "midi%r", unit);
if (cookie) devfs_makelink(cookie, "midi");
- cookie = devfs_add_devswf(&snd_cdevsw, (dev->id_unit << 4) | SND_DEV_SYNTH,
- DV_CHR, UID_SND, GID_SND, PERM_SND, "sequencer%r", dev->id_unit);
+ cookie = devfs_add_devswf(&snd_cdevsw, (unit << 4) | SND_DEV_SYNTH,
+ DV_CHR, UID_SND, GID_SND, PERM_SND, "sequencer%r", unit);
if (cookie) devfs_makelink(cookie, "sequencer");
#endif
#endif /* DEVFS */
OpenPOWER on IntegriCloud