From 489c22ebb854d89934fe808f5d85f5dc4de85db5 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 4 Apr 2002 20:56:47 +0000 Subject: [PATCH] Add lock type arguments to callers of snd_mtxcreate(). --- sys/dev/sound/isa/ad1816.c | 2 +- sys/dev/sound/isa/mss.c | 2 +- sys/dev/sound/isa/sbc.c | 2 +- sys/dev/sound/pci/cmi.c | 2 +- sys/dev/sound/pci/ds1.c | 2 +- sys/dev/sound/pci/emu10k1.c | 2 +- sys/dev/sound/pci/t4dwave.c | 2 +- sys/dev/sound/pcm/ac97.c | 2 +- sys/dev/sound/pcm/channel.c | 2 +- sys/dev/sound/pcm/mixer.c | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/dev/sound/isa/ad1816.c b/sys/dev/sound/isa/ad1816.c index 18bbf8760abd..7371b899450c 100644 --- a/sys/dev/sound/isa/ad1816.c +++ b/sys/dev/sound/isa/ad1816.c @@ -587,7 +587,7 @@ ad1816_attach(device_t dev) ad1816 = (struct ad1816_info *)malloc(sizeof *ad1816, M_DEVBUF, M_NOWAIT | M_ZERO); if (!ad1816) return ENXIO; - ad1816->lock = snd_mtxcreate(device_get_nameunit(dev)); + ad1816->lock = snd_mtxcreate(device_get_nameunit(dev), "sound softc"); ad1816->io_rid = 2; ad1816->irq_rid = 0; ad1816->drq1_rid = 0; diff --git a/sys/dev/sound/isa/mss.c b/sys/dev/sound/isa/mss.c index 825be320ddbe..d946b382221a 100644 --- a/sys/dev/sound/isa/mss.c +++ b/sys/dev/sound/isa/mss.c @@ -1665,7 +1665,7 @@ mss_doattach(device_t dev, struct mss_info *mss) int pdma, rdma, flags = device_get_flags(dev); char status[SND_STATUSLEN], status2[SND_STATUSLEN]; - mss->lock = snd_mtxcreate(device_get_nameunit(dev)); + mss->lock = snd_mtxcreate(device_get_nameunit(dev), "sound softc"); mss->bufsize = pcm_getbuffersize(dev, 4096, MSS_DEFAULT_BUFSZ, 65536); if (!mss_alloc_resources(mss, dev)) goto no; mss_init(mss, dev); diff --git a/sys/dev/sound/isa/sbc.c b/sys/dev/sound/isa/sbc.c index 39c6b2428973..5a7ec489c2da 100644 --- a/sys/dev/sound/isa/sbc.c +++ b/sys/dev/sound/isa/sbc.c @@ -114,7 +114,7 @@ static void sb_setmixer(struct resource *io, u_int port, u_int value); static void sbc_lockinit(struct sbc_softc *scp) { - scp->lock = snd_mtxcreate(device_get_nameunit(scp->dev)); + scp->lock = snd_mtxcreate(device_get_nameunit(scp->dev), "sound softc"); } static void diff --git a/sys/dev/sound/pci/cmi.c b/sys/dev/sound/pci/cmi.c index 62cfac2ba61a..9891e340ca1b 100644 --- a/sys/dev/sound/pci/cmi.c +++ b/sys/dev/sound/pci/cmi.c @@ -842,7 +842,7 @@ cmi_attach(device_t dev) return ENXIO; } - sc->lock = snd_mtxcreate(device_get_nameunit(dev)); + sc->lock = snd_mtxcreate(device_get_nameunit(dev), "sound softc"); data = pci_read_config(dev, PCIR_COMMAND, 2); data |= (PCIM_CMD_PORTEN|PCIM_CMD_BUSMASTEREN); pci_write_config(dev, PCIR_COMMAND, data, 2); diff --git a/sys/dev/sound/pci/ds1.c b/sys/dev/sound/pci/ds1.c index 776aa9e65e35..d5483774df71 100644 --- a/sys/dev/sound/pci/ds1.c +++ b/sys/dev/sound/pci/ds1.c @@ -939,7 +939,7 @@ ds_pci_attach(device_t dev) return ENXIO; } - sc->lock = snd_mtxcreate(device_get_nameunit(dev)); + sc->lock = snd_mtxcreate(device_get_nameunit(dev), "sound softc"); sc->dev = dev; subdev = (pci_get_subdevice(dev) << 16) | pci_get_subvendor(dev); sc->type = ds_finddev(pci_get_devid(dev), subdev); diff --git a/sys/dev/sound/pci/emu10k1.c b/sys/dev/sound/pci/emu10k1.c index e79316c87c53..02f986718c0c 100644 --- a/sys/dev/sound/pci/emu10k1.c +++ b/sys/dev/sound/pci/emu10k1.c @@ -1460,7 +1460,7 @@ emu_pci_attach(device_t dev) return ENXIO; } - sc->lock = snd_mtxcreate(device_get_nameunit(dev)); + sc->lock = snd_mtxcreate(device_get_nameunit(dev), "sound softc"); sc->dev = dev; sc->type = pci_get_devid(dev); sc->rev = pci_get_revid(dev); diff --git a/sys/dev/sound/pci/t4dwave.c b/sys/dev/sound/pci/t4dwave.c index cbd8f5b5d8eb..194130337a09 100644 --- a/sys/dev/sound/pci/t4dwave.c +++ b/sys/dev/sound/pci/t4dwave.c @@ -765,7 +765,7 @@ tr_pci_attach(device_t dev) } tr->type = pci_get_devid(dev); - tr->lock = snd_mtxcreate(device_get_nameunit(dev)); + tr->lock = snd_mtxcreate(device_get_nameunit(dev), "sound softc"); data = pci_read_config(dev, PCIR_COMMAND, 2); data |= (PCIM_CMD_PORTEN|PCIM_CMD_MEMEN|PCIM_CMD_BUSMASTEREN); diff --git a/sys/dev/sound/pcm/ac97.c b/sys/dev/sound/pcm/ac97.c index 7ae3a6726006..7765671886f0 100644 --- a/sys/dev/sound/pcm/ac97.c +++ b/sys/dev/sound/pcm/ac97.c @@ -498,7 +498,7 @@ ac97_create(device_t dev, void *devinfo, kobj_class_t cls) return NULL; snprintf(codec->name, AC97_NAMELEN, "%s:ac97", device_get_nameunit(dev)); - codec->lock = snd_mtxcreate(codec->name); + codec->lock = snd_mtxcreate(codec->name, "ac97 codec"); codec->methods = kobj_create(cls, M_AC97, M_WAITOK); if (codec->methods == NULL) { snd_mtxlock(codec->lock); diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index c55229ccc8d5..4c2752e1d554 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -70,7 +70,7 @@ static int chn_buildfeeder(struct pcm_channel *c); static void chn_lockinit(struct pcm_channel *c) { - c->lock = snd_mtxcreate(c->name); + c->lock = snd_mtxcreate(c->name, "pcm channel"); } static void diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index d4894a580b4a..f732b3fc3a94 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -202,7 +202,7 @@ mixer_init(device_t dev, kobj_class_t cls, void *devinfo) m = (struct snd_mixer *)kobj_create(cls, M_MIXER, M_WAITOK | M_ZERO); snprintf(m->name, MIXER_NAMELEN, "%s:mixer", device_get_nameunit(dev)); - m->lock = snd_mtxcreate(m->name); + m->lock = snd_mtxcreate(m->name, "pcm mixer"); m->type = cls->name; m->devinfo = devinfo; m->busy = 0;