summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2003-01-21 08:56:16 +0000
committeralfred <alfred@FreeBSD.org>2003-01-21 08:56:16 +0000
commitbf8e8a6e8f0bd9165109f0a258730dd242299815 (patch)
treef16a2fb9fa7a7fbc4c19e981d278d5f6eb53234d /sys/dev/sound
parent2180deee00350fff613a1d1d1328eddc4c0ba9c8 (diff)
downloadFreeBSD-src-bf8e8a6e8f0bd9165109f0a258730dd242299815.zip
FreeBSD-src-bf8e8a6e8f0bd9165109f0a258730dd242299815.tar.gz
Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
Diffstat (limited to 'sys/dev/sound')
-rw-r--r--sys/dev/sound/midi/midi.c6
-rw-r--r--sys/dev/sound/midi/midibuf.c2
-rw-r--r--sys/dev/sound/midi/sequencer.c6
-rw-r--r--sys/dev/sound/midi/timer.c4
-rw-r--r--sys/dev/sound/pci/ds1.c2
-rw-r--r--sys/dev/sound/pci/emu10k1.c2
-rw-r--r--sys/dev/sound/pcm/ac97.c2
-rw-r--r--sys/dev/sound/pcm/buffer.c2
-rw-r--r--sys/dev/sound/pcm/fake.c4
-rw-r--r--sys/dev/sound/pcm/feeder.c4
-rw-r--r--sys/dev/sound/pcm/mixer.c2
-rw-r--r--sys/dev/sound/pcm/sndstat.c2
-rw-r--r--sys/dev/sound/pcm/sound.c8
-rw-r--r--sys/dev/sound/pcm/vchan.c4
14 files changed, 25 insertions, 25 deletions
diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c
index 07d2660..6e2de52 100644
--- a/sys/dev/sound/midi/midi.c
+++ b/sys/dev/sound/midi/midi.c
@@ -282,7 +282,7 @@ create_mididev_info_unit(int type, mididev_info *mdinf, synthdev_info *syninf)
}
/* As malloc(9) might block, allocate mididev_info now. */
- mdnew = malloc(sizeof(mididev_info), M_DEVBUF, M_WAITOK | M_ZERO);
+ mdnew = malloc(sizeof(mididev_info), M_DEVBUF, M_ZERO);
if (mdnew == NULL)
return NULL;
bcopy(mdinf, mdnew, sizeof(mididev_info));
@@ -607,7 +607,7 @@ midi_read(dev_t i_dev, struct uio * buf, int flag)
len = buf->uio_resid;
lenr = 0;
- uiobuf = (u_char *)malloc(len, M_DEVBUF, M_WAITOK | M_ZERO);
+ uiobuf = (u_char *)malloc(len, M_DEVBUF, M_ZERO);
if (uiobuf == NULL)
return (ENOMEM);
@@ -659,7 +659,7 @@ midi_write(dev_t i_dev, struct uio * buf, int flag)
len = buf->uio_resid;
lenw = 0;
- uiobuf = (u_char *)malloc(len, M_DEVBUF, M_WAITOK | M_ZERO);
+ uiobuf = (u_char *)malloc(len, M_DEVBUF, M_ZERO);
if (uiobuf == NULL)
return (ENOMEM);
diff --git a/sys/dev/sound/midi/midibuf.c b/sys/dev/sound/midi/midibuf.c
index 8b4eda7..41ea4dd 100644
--- a/sys/dev/sound/midi/midibuf.c
+++ b/sys/dev/sound/midi/midibuf.c
@@ -55,7 +55,7 @@ int
midibuf_init(midi_dbuf *dbuf)
{
if (dbuf->buf == NULL) {
- dbuf->buf = malloc(MIDI_BUFFSIZE, M_DEVBUF, M_WAITOK | M_ZERO);
+ dbuf->buf = malloc(MIDI_BUFFSIZE, M_DEVBUF, M_ZERO);
cv_init(&dbuf->cv_in, "midi queue in");
cv_init(&dbuf->cv_out, "midi queue out");
}
diff --git a/sys/dev/sound/midi/sequencer.c b/sys/dev/sound/midi/sequencer.c
index 5115cc9..7d0b6e2 100644
--- a/sys/dev/sound/midi/sequencer.c
+++ b/sys/dev/sound/midi/sequencer.c
@@ -322,7 +322,7 @@ seq_initunit(int unit)
dev_t seqdev, musicdev;
/* Allocate the softc. */
- scp = malloc(sizeof(*scp), M_DEVBUF, M_WAITOK | M_ZERO);
+ scp = malloc(sizeof(*scp), M_DEVBUF, M_ZERO);
if (scp == (sc_p)NULL) {
printf("seq_initunit: unit %d, softc allocation failed.\n", unit);
return (1);
@@ -544,7 +544,7 @@ seq_read(dev_t i_dev, struct uio *buf, int flag)
len = buf->uio_resid;
lenr = 0;
- uiobuf = (u_char *)malloc(len, M_DEVBUF, M_WAITOK | M_ZERO);
+ uiobuf = (u_char *)malloc(len, M_DEVBUF, M_ZERO);
if (uiobuf == NULL)
return (ENOMEM);
@@ -2364,7 +2364,7 @@ create_seqdev_info_unit(int unit, seqdev_info *seq)
seqdev_info *sd, *sdnew;
/* As malloc(9) might block, allocate seqdev_info now. */
- sdnew = malloc(sizeof(seqdev_info), M_DEVBUF, M_WAITOK | M_ZERO);
+ sdnew = malloc(sizeof(seqdev_info), M_DEVBUF, M_ZERO);
if (sdnew == NULL)
return NULL;
bcopy(seq, sdnew, sizeof(seqdev_info));
diff --git a/sys/dev/sound/midi/timer.c b/sys/dev/sound/midi/timer.c
index ba4bce0..b5c75cf 100644
--- a/sys/dev/sound/midi/timer.c
+++ b/sys/dev/sound/midi/timer.c
@@ -97,7 +97,7 @@ timerdev_install(void)
tmd = NULL;
scp = NULL;
- scp = malloc(sizeof(*scp), M_DEVBUF, M_WAITOK | M_ZERO);
+ scp = malloc(sizeof(*scp), M_DEVBUF, M_ZERO);
if (scp == NULL) {
ret = ENOMEM;
goto fail;
@@ -146,7 +146,7 @@ create_timerdev_info_unit(timerdev_info *tmdinf)
}
/* As malloc(9) might block, allocate timerdev_info now. */
- tmdnew = malloc(sizeof(timerdev_info), M_DEVBUF, M_WAITOK | M_ZERO);
+ tmdnew = malloc(sizeof(timerdev_info), M_DEVBUF, M_ZERO);
if (tmdnew == NULL)
return NULL;
bcopy(tmdinf, tmdnew, sizeof(timerdev_info));
diff --git a/sys/dev/sound/pci/ds1.c b/sys/dev/sound/pci/ds1.c
index 896a8af..dfffd8d 100644
--- a/sys/dev/sound/pci/ds1.c
+++ b/sys/dev/sound/pci/ds1.c
@@ -934,7 +934,7 @@ ds_pci_attach(device_t dev)
struct ac97_info *codec = NULL;
char status[SND_STATUSLEN];
- if ((sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK | M_ZERO)) == NULL) {
+ if ((sc = malloc(sizeof(*sc), M_DEVBUF, M_ZERO)) == NULL) {
device_printf(dev, "cannot allocate softc\n");
return ENXIO;
}
diff --git a/sys/dev/sound/pci/emu10k1.c b/sys/dev/sound/pci/emu10k1.c
index e9c99cb..52e16bf 100644
--- a/sys/dev/sound/pci/emu10k1.c
+++ b/sys/dev/sound/pci/emu10k1.c
@@ -1455,7 +1455,7 @@ emu_pci_attach(device_t dev)
int i, gotmic;
char status[SND_STATUSLEN];
- if ((sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK | M_ZERO)) == NULL) {
+ if ((sc = malloc(sizeof(*sc), M_DEVBUF, M_ZERO)) == NULL) {
device_printf(dev, "cannot allocate softc\n");
return ENXIO;
}
diff --git a/sys/dev/sound/pcm/ac97.c b/sys/dev/sound/pcm/ac97.c
index 0f3c905..c0f8884 100644
--- a/sys/dev/sound/pcm/ac97.c
+++ b/sys/dev/sound/pcm/ac97.c
@@ -540,7 +540,7 @@ ac97_create(device_t dev, void *devinfo, kobj_class_t cls)
snprintf(codec->name, AC97_NAMELEN, "%s:ac97", device_get_nameunit(dev));
codec->lock = snd_mtxcreate(codec->name, "ac97 codec");
- codec->methods = kobj_create(cls, M_AC97, M_WAITOK);
+ codec->methods = kobj_create(cls, M_AC97, 0);
if (codec->methods == NULL) {
snd_mtxlock(codec->lock);
snd_mtxfree(codec->lock);
diff --git a/sys/dev/sound/pcm/buffer.c b/sys/dev/sound/pcm/buffer.c
index d498591..9a49e28 100644
--- a/sys/dev/sound/pcm/buffer.c
+++ b/sys/dev/sound/pcm/buffer.c
@@ -58,7 +58,7 @@ sndbuf_create(device_t dev, char *drv, char *desc)
{
struct snd_dbuf *b;
- b = malloc(sizeof(*b), M_DEVBUF, M_WAITOK | M_ZERO);
+ b = malloc(sizeof(*b), M_DEVBUF, M_ZERO);
snprintf(b->name, SNDBUF_NAMELEN, "%s:%s", drv, desc);
b->dev = dev;
diff --git a/sys/dev/sound/pcm/fake.c b/sys/dev/sound/pcm/fake.c
index 8c4ba77..f1bd33c 100644
--- a/sys/dev/sound/pcm/fake.c
+++ b/sys/dev/sound/pcm/fake.c
@@ -117,8 +117,8 @@ fkchan_setup(device_t dev)
struct snddev_info *d = device_get_softc(dev);
struct pcm_channel *c;
- c = malloc(sizeof(*c), M_DEVBUF, M_WAITOK);
- c->methods = kobj_create(&fkchan_class, M_DEVBUF, M_WAITOK);
+ c = malloc(sizeof(*c), M_DEVBUF, 0);
+ c->methods = kobj_create(&fkchan_class, M_DEVBUF, 0);
c->parentsnddev = d;
snprintf(c->name, CHN_NAMELEN, "%s:fake", device_get_nameunit(dev));
diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c
index 424da4d..0edb34f 100644
--- a/sys/dev/sound/pcm/feeder.c
+++ b/sys/dev/sound/pcm/feeder.c
@@ -59,7 +59,7 @@ feeder_register(void *p)
KASSERT(fc->desc == NULL, ("first feeder not root: %s", fc->name));
SLIST_INIT(&feedertab);
- fte = malloc(sizeof(*fte), M_FEEDER, M_WAITOK | M_ZERO);
+ fte = malloc(sizeof(*fte), M_FEEDER, M_ZERO);
if (fte == NULL) {
printf("can't allocate memory for root feeder: %s\n",
fc->name);
@@ -84,7 +84,7 @@ feeder_register(void *p)
i = 0;
while ((feedercnt < MAXFEEDERS) && (fc->desc[i].type > 0)) {
/* printf("adding feeder %s, %x -> %x\n", fc->name, fc->desc[i].in, fc->desc[i].out); */
- fte = malloc(sizeof(*fte), M_FEEDER, M_WAITOK | M_ZERO);
+ fte = malloc(sizeof(*fte), M_FEEDER, M_ZERO);
if (fte == NULL) {
printf("can't allocate memory for feeder '%s', %x -> %x\n", fc->name, fc->desc[i].in, fc->desc[i].out);
diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c
index 182d290..2c3c3f4 100644
--- a/sys/dev/sound/pcm/mixer.c
+++ b/sys/dev/sound/pcm/mixer.c
@@ -200,7 +200,7 @@ mixer_init(device_t dev, kobj_class_t cls, void *devinfo)
dev_t pdev;
int i, unit;
- m = (struct snd_mixer *)kobj_create(cls, M_MIXER, M_WAITOK | M_ZERO);
+ m = (struct snd_mixer *)kobj_create(cls, M_MIXER, M_ZERO);
snprintf(m->name, MIXER_NAMELEN, "%s:mixer", device_get_nameunit(dev));
m->lock = snd_mtxcreate(m->name, "pcm mixer");
m->type = cls->name;
diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c
index bdaff2b..6d2a27a 100644
--- a/sys/dev/sound/pcm/sndstat.c
+++ b/sys/dev/sound/pcm/sndstat.c
@@ -222,7 +222,7 @@ sndstat_register(device_t dev, char *str, sndstat_handler handler)
unit = -1;
}
- ent = malloc(sizeof *ent, M_DEVBUF, M_ZERO | M_WAITOK);
+ ent = malloc(sizeof *ent, M_DEVBUF, M_ZERO | 0);
if (!ent)
return ENOSPC;
diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c
index c184a69..f6d852f 100644
--- a/sys/dev/sound/pcm/sound.c
+++ b/sys/dev/sound/pcm/sound.c
@@ -91,7 +91,7 @@ snd_mtxcreate(const char *desc, const char *type)
#ifdef USING_MUTEX
struct mtx *m;
- m = malloc(sizeof(*m), M_DEVBUF, M_WAITOK | M_ZERO);
+ m = malloc(sizeof(*m), M_DEVBUF, M_ZERO);
if (m == NULL)
return NULL;
mtx_init(m, desc, type, MTX_RECURSE);
@@ -364,11 +364,11 @@ pcm_chn_create(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t c
return NULL;
}
- ch = malloc(sizeof(*ch), M_DEVBUF, M_WAITOK | M_ZERO);
+ ch = malloc(sizeof(*ch), M_DEVBUF, M_ZERO);
if (!ch)
return NULL;
- ch->methods = kobj_create(cls, M_DEVBUF, M_WAITOK);
+ ch->methods = kobj_create(cls, M_DEVBUF, 0);
if (!ch->methods) {
free(ch, M_DEVBUF);
@@ -426,7 +426,7 @@ pcm_chn_add(struct snddev_info *d, struct pcm_channel *ch, int mkdev)
int unit = device_get_unit(d->dev);
int x = -1;
- sce = malloc(sizeof(*sce), M_DEVBUF, M_WAITOK | M_ZERO);
+ sce = malloc(sizeof(*sce), M_DEVBUF, M_ZERO);
if (!sce) {
return ENOMEM;
}
diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c
index 8da3c3e..ab04ac3b 100644
--- a/sys/dev/sound/pcm/vchan.c
+++ b/sys/dev/sound/pcm/vchan.c
@@ -124,7 +124,7 @@ vchan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c,
struct pcm_channel *parent = devinfo;
KASSERT(dir == PCMDIR_PLAY, ("vchan_init: bad direction"));
- ch = malloc(sizeof(*ch), M_DEVBUF, M_WAITOK | M_ZERO);
+ ch = malloc(sizeof(*ch), M_DEVBUF, M_ZERO);
ch->parent = parent;
ch->channel = c;
ch->fmt = AFMT_U8;
@@ -237,7 +237,7 @@ vchan_create(struct pcm_channel *parent)
struct pcm_channel *child;
int err, first;
- pce = malloc(sizeof(*pce), M_DEVBUF, M_WAITOK | M_ZERO);
+ pce = malloc(sizeof(*pce), M_DEVBUF, M_ZERO);
if (!pce) {
return ENOMEM;
}
OpenPOWER on IntegriCloud