Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F149513164
D53734.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D53734.id.diff
View Options
diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c
--- a/sys/dev/sound/pcm/dsp.c
+++ b/sys/dev/sound/pcm/dsp.c
@@ -462,7 +462,7 @@
dsp_io_ops(struct dsp_cdevpriv *priv, struct uio *buf)
{
struct snddev_info *d;
- struct pcm_channel **ch;
+ struct pcm_channel *ch;
int (*chn_io)(struct pcm_channel *, struct uio *);
int prio, ret;
pid_t runpid;
@@ -476,12 +476,12 @@
switch (buf->uio_rw) {
case UIO_READ:
prio = FREAD;
- ch = &priv->rdch;
+ ch = priv->rdch;
chn_io = chn_read;
break;
case UIO_WRITE:
prio = FWRITE;
- ch = &priv->wrch;
+ ch = priv->wrch;
chn_io = chn_write;
break;
}
@@ -490,21 +490,21 @@
dsp_lock_chans(priv, prio);
- if (*ch == NULL || !((*ch)->flags & CHN_F_BUSY)) {
+ if (ch == NULL || !(ch->flags & CHN_F_BUSY)) {
if (priv->rdch != NULL || priv->wrch != NULL)
dsp_unlock_chans(priv, prio);
PCM_GIANT_EXIT(d);
return (EBADF);
}
- if (((*ch)->flags & (CHN_F_MMAP | CHN_F_DEAD)) ||
- (((*ch)->flags & CHN_F_RUNNING) && (*ch)->pid != runpid)) {
+ if (ch->flags & (CHN_F_MMAP | CHN_F_DEAD) ||
+ (ch->flags & CHN_F_RUNNING && ch->pid != runpid)) {
dsp_unlock_chans(priv, prio);
PCM_GIANT_EXIT(d);
return (EINVAL);
- } else if (!((*ch)->flags & CHN_F_RUNNING)) {
- (*ch)->flags |= CHN_F_RUNNING;
- (*ch)->pid = runpid;
+ } else if (!(ch->flags & CHN_F_RUNNING)) {
+ ch->flags |= CHN_F_RUNNING;
+ ch->pid = runpid;
}
/*
@@ -512,11 +512,11 @@
* from/to userland, so up the "in progress" counter to make sure
* someone else doesn't come along and muss up the buffer.
*/
- ++(*ch)->inprog;
- ret = chn_io(*ch, buf);
- --(*ch)->inprog;
+ ch->inprog++;
+ ret = chn_io(ch, buf);
+ ch->inprog--;
- CHN_BROADCAST(&(*ch)->cv);
+ CHN_BROADCAST(&ch->cv);
dsp_unlock_chans(priv, prio);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 25, 11:24 PM (3 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30334301
Default Alt Text
D53734.id.diff (1 KB)
Attached To
Mode
D53734: sound: Do not use double pointer in dsp_io_ops()
Attached
Detach File
Event Timeline
Log In to Comment