Skip to content

Commit

Permalink
control: remove snd_konctrol_volatile::owner_pid field
Browse files Browse the repository at this point in the history
We do not need to save the ID of the process that locked a control
because that information is already available in the owner's file data.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Clemens Ladisch authored and Takashi Iwai committed Nov 6, 2009
1 parent b419148 commit 31cef70
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion include/sound/control.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ struct snd_kcontrol_new {

struct snd_kcontrol_volatile {
struct snd_ctl_file *owner; /* locked */
pid_t owner_pid;
unsigned int access; /* access rights */
};

Expand Down
4 changes: 1 addition & 3 deletions sound/core/control.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ static int snd_ctl_elem_info(struct snd_ctl_file *ctl,
info->access |= SNDRV_CTL_ELEM_ACCESS_LOCK;
if (vd->owner == ctl)
info->access |= SNDRV_CTL_ELEM_ACCESS_OWNER;
info->owner = vd->owner_pid;
info->owner = vd->owner->pid;
} else {
info->owner = -1;
}
Expand Down Expand Up @@ -827,7 +827,6 @@ static int snd_ctl_elem_lock(struct snd_ctl_file *file,
result = -EBUSY;
else {
vd->owner = file;
vd->owner_pid = current->pid;
result = 0;
}
}
Expand Down Expand Up @@ -858,7 +857,6 @@ static int snd_ctl_elem_unlock(struct snd_ctl_file *file,
result = -EPERM;
else {
vd->owner = NULL;
vd->owner_pid = 0;
result = 0;
}
}
Expand Down

0 comments on commit 31cef70

Please sign in to comment.