diff options
author | ariff <ariff@FreeBSD.org> | 2007-04-02 03:46:25 +0000 |
---|---|---|
committer | ariff <ariff@FreeBSD.org> | 2007-04-02 03:46:25 +0000 |
commit | d01f077809a5d2cf10425d052e1613b0315bc590 (patch) | |
tree | 575c0efe7975d718df6a928e8996881066c5a36b /sys/dev | |
parent | 2dff498dfead3dca510644055c6e330ceb4b5410 (diff) | |
download | FreeBSD-src-d01f077809a5d2cf10425d052e1613b0315bc590.zip FreeBSD-src-d01f077809a5d2cf10425d052e1613b0315bc590.tar.gz |
No need to track every closing instance, and put busy counter to rest
in its single bit coffin.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/sound/pcm/mixer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 3deded7..ad1967b 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -37,7 +37,7 @@ struct snd_mixer { KOBJ_FIELDS; const char *type; void *devinfo; - int busy; + int busy:1; int hwvol_muted; int hwvol_mixer; int hwvol_step; @@ -86,7 +86,7 @@ static d_close_t mixer_close; static struct cdevsw mixer_cdevsw = { .d_version = D_VERSION, - .d_flags = D_TRACKCLOSE | D_NEEDGIANT, + .d_flags = D_NEEDGIANT, .d_open = mixer_open, .d_close = mixer_close, .d_ioctl = mixer_ioctl, @@ -733,7 +733,7 @@ mixer_open(struct cdev *i_dev, int flags, int mode, struct thread *td) m = i_dev->si_drv1; snd_mtxlock(m->lock); - m->busy++; + m->busy = 1; snd_mtxunlock(m->lock); return 0; @@ -751,7 +751,7 @@ mixer_close(struct cdev *i_dev, int flags, int mode, struct thread *td) snd_mtxunlock(m->lock); return EBADF; } - m->busy--; + m->busy = 0; snd_mtxunlock(m->lock); return 0; |