summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2003-02-19 05:47:46 +0000
committerimp <imp@FreeBSD.org>2003-02-19 05:47:46 +0000
commitcf874b345d0f766fb64cf4737e1c85ccc78d2bee (patch)
tree9e20e320fe15ae4bf68f8335fcf9d3e71d3b3614 /sys/dev/sound
parentb72619cecb8265d3efb3781b0acff1380762c173 (diff)
downloadFreeBSD-src-cf874b345d0f766fb64cf4737e1c85ccc78d2bee.zip
FreeBSD-src-cf874b345d0f766fb64cf4737e1c85ccc78d2bee.tar.gz
Back out M_* changes, per decision of the TRB.
Approved by: trb
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 6e2de52..07d2660 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_ZERO);
+ mdnew = malloc(sizeof(mididev_info), M_DEVBUF, M_WAITOK | 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_ZERO);
+ uiobuf = (u_char *)malloc(len, M_DEVBUF, M_WAITOK | 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_ZERO);
+ uiobuf = (u_char *)malloc(len, M_DEVBUF, M_WAITOK | M_ZERO);
if (uiobuf == NULL)
return (ENOMEM);
diff --git a/sys/dev/sound/midi/midibuf.c b/sys/dev/sound/midi/midibuf.c
index 41ea4dd..8b4eda7 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_ZERO);
+ dbuf->buf = malloc(MIDI_BUFFSIZE, M_DEVBUF, M_WAITOK | 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 7d0b6e2..5115cc9 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_ZERO);
+ scp = malloc(sizeof(*scp), M_DEVBUF, M_WAITOK | 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_ZERO);
+ uiobuf = (u_char *)malloc(len, M_DEVBUF, M_WAITOK | 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_ZERO);
+ sdnew = malloc(sizeof(seqdev_info), M_DEVBUF, M_WAITOK | 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 b5c75cf..ba4bce0 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_ZERO);
+ scp = malloc(sizeof(*scp), M_DEVBUF, M_WAITOK | 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_ZERO);
+ tmdnew = malloc(sizeof(timerdev_info), M_DEVBUF, M_WAITOK | 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 dfffd8d..896a8af 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_ZERO)) == NULL) {
+ if ((sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK | 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 52e16bf..e9c99cb 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_ZERO)) == NULL) {
+ if ((sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK | 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 a4b49a3..472c2da 100644
--- a/sys/dev/sound/pcm/ac97.c
+++ b/sys/dev/sound/pcm/ac97.c
@@ -552,7 +552,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, 0);
+ codec->methods = kobj_create(cls, M_AC97, M_WAITOK);
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 645e3b3..a096b40 100644
--- a/sys/dev/sound/pcm/buffer.c
+++ b/sys/dev/sound/pcm/buffer.c
@@ -35,7 +35,7 @@ sndbuf_create(device_t dev, char *drv, char *desc)
{
struct snd_dbuf *b;
- b = malloc(sizeof(*b), M_DEVBUF, M_ZERO);
+ b = malloc(sizeof(*b), M_DEVBUF, M_WAITOK | 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 f1bd33c..8c4ba77 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, 0);
- c->methods = kobj_create(&fkchan_class, M_DEVBUF, 0);
+ c = malloc(sizeof(*c), M_DEVBUF, M_WAITOK);
+ c->methods = kobj_create(&fkchan_class, M_DEVBUF, M_WAITOK);
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 915111a..91bdb66 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_ZERO);
+ fte = malloc(sizeof(*fte), M_FEEDER, M_WAITOK | 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_ZERO);
+ fte = malloc(sizeof(*fte), M_FEEDER, M_WAITOK | 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 2c3c3f4..182d290 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_ZERO);
+ 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, "pcm mixer");
m->type = cls->name;
diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c
index 6d2a27a..bdaff2b 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 | 0);
+ ent = malloc(sizeof *ent, M_DEVBUF, M_ZERO | M_WAITOK);
if (!ent)
return ENOSPC;
diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c
index f6d852f..c184a69 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_ZERO);
+ m = malloc(sizeof(*m), M_DEVBUF, M_WAITOK | 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_ZERO);
+ ch = malloc(sizeof(*ch), M_DEVBUF, M_WAITOK | M_ZERO);
if (!ch)
return NULL;
- ch->methods = kobj_create(cls, M_DEVBUF, 0);
+ ch->methods = kobj_create(cls, M_DEVBUF, M_WAITOK);
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_ZERO);
+ sce = malloc(sizeof(*sce), M_DEVBUF, M_WAITOK | M_ZERO);
if (!sce) {
return ENOMEM;
}
diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c
index f0b5c1e..eca4ac4 100644
--- a/sys/dev/sound/pcm/vchan.c
+++ b/sys/dev/sound/pcm/vchan.c
@@ -122,7 +122,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_ZERO);
+ ch = malloc(sizeof(*ch), M_DEVBUF, M_WAITOK | M_ZERO);
ch->parent = parent;
ch->channel = c;
ch->fmt = AFMT_U8;
@@ -235,7 +235,7 @@ vchan_create(struct pcm_channel *parent)
struct pcm_channel *child;
int err, first;
- pce = malloc(sizeof(*pce), M_DEVBUF, M_ZERO);
+ pce = malloc(sizeof(*pce), M_DEVBUF, M_WAITOK | M_ZERO);
if (!pce) {
return ENOMEM;
}
OpenPOWER on IntegriCloud