diff options
author | cg <cg@FreeBSD.org> | 2001-07-01 18:57:16 +0000 |
---|---|---|
committer | cg <cg@FreeBSD.org> | 2001-07-01 18:57:16 +0000 |
commit | 51c9fcab5ced9e855f61db58081d9a5b725cb339 (patch) | |
tree | cc6e1334fb62523b730e89d51bca7ff5b4bbfc7a /sys/dev/sound/pcm/dsp.c | |
parent | d5d7bb721c86dfd07b77b5b2a28157121dc16ab8 (diff) | |
download | FreeBSD-src-51c9fcab5ced9e855f61db58081d9a5b725cb339.zip FreeBSD-src-51c9fcab5ced9e855f61db58081d9a5b725cb339.tar.gz |
don't set a flag that is already set
Diffstat (limited to 'sys/dev/sound/pcm/dsp.c')
-rw-r--r-- | sys/dev/sound/pcm/dsp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 7b01ae1..94b1274 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -985,7 +985,9 @@ dsp_mmap(dev_t i_dev, vm_offset_t offset, int nprot) return -1; } - c->flags |= CHN_F_MAPPED; + if (!(c->flags & CHN_F_MAPPED)) + c->flags |= CHN_F_MAPPED; + ret = atop(vtophys(((char *)sndbuf_getbuf(c->bufsoft)) + offset)); relchns(i_dev, rdch, wrch, SD_F_PRIO_RD | SD_F_PRIO_WR); |