mirror of
https://git.freebsd.org/src.git
synced 2026-01-16 23:02:24 +00:00
sound: Merge chn_intr() with chn_intr_locked()
There is no scenario where chn_intr() is called with the channel lock already held. No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D53854
This commit is contained in:
parent
3107b952f5
commit
e254ef87a3
2 changed files with 2 additions and 19 deletions
|
|
@ -579,30 +579,14 @@ chn_read(struct pcm_channel *c, struct uio *buf)
|
|||
}
|
||||
|
||||
void
|
||||
chn_intr_locked(struct pcm_channel *c)
|
||||
chn_intr(struct pcm_channel *c)
|
||||
{
|
||||
|
||||
CHN_LOCKASSERT(c);
|
||||
|
||||
CHN_LOCK(c);
|
||||
c->interrupts++;
|
||||
|
||||
if (c->direction == PCMDIR_PLAY)
|
||||
chn_wrintr(c);
|
||||
else
|
||||
chn_rdintr(c);
|
||||
}
|
||||
|
||||
void
|
||||
chn_intr(struct pcm_channel *c)
|
||||
{
|
||||
|
||||
if (CHN_LOCKOWNED(c)) {
|
||||
chn_intr_locked(c);
|
||||
return;
|
||||
}
|
||||
|
||||
CHN_LOCK(c);
|
||||
chn_intr_locked(c);
|
||||
CHN_UNLOCK(c);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -298,7 +298,6 @@ int chn_oss_setorder(struct pcm_channel *, unsigned long long *);
|
|||
int chn_oss_getmask(struct pcm_channel *, uint32_t *);
|
||||
|
||||
void chn_resetbuf(struct pcm_channel *c);
|
||||
void chn_intr_locked(struct pcm_channel *c);
|
||||
void chn_intr(struct pcm_channel *c);
|
||||
int chn_abort(struct pcm_channel *c);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue