diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2009-11-02 03:34:16 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-11-06 08:32:03 -0500 |
commit | 31cef7076ed9409a33f19ea372d6dc5fdefe27ae (patch) | |
tree | 399f23081af72b3015cc28a3ac6bbc5d7aedb5f9 | |
parent | b419148e567728f6af0c3b01965c1cc141e3e13a (diff) |
control: remove snd_konctrol_volatile::owner_pid field
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>
-rw-r--r-- | include/sound/control.h | 1 | ||||
-rw-r--r-- | sound/core/control.c | 4 |
2 files changed, 1 insertions, 4 deletions
diff --git a/include/sound/control.h b/include/sound/control.h index ef96f07aa03b..3517745d0a2d 100644 --- a/include/sound/control.h +++ b/include/sound/control.h | |||
@@ -56,7 +56,6 @@ struct snd_kcontrol_new { | |||
56 | 56 | ||
57 | struct snd_kcontrol_volatile { | 57 | struct snd_kcontrol_volatile { |
58 | struct snd_ctl_file *owner; /* locked */ | 58 | struct snd_ctl_file *owner; /* locked */ |
59 | pid_t owner_pid; | ||
60 | unsigned int access; /* access rights */ | 59 | unsigned int access; /* access rights */ |
61 | }; | 60 | }; |
62 | 61 | ||
diff --git a/sound/core/control.c b/sound/core/control.c index a8b7fabe645e..814d2cf1a34c 100644 --- a/sound/core/control.c +++ b/sound/core/control.c | |||
@@ -672,7 +672,7 @@ static int snd_ctl_elem_info(struct snd_ctl_file *ctl, | |||
672 | info->access |= SNDRV_CTL_ELEM_ACCESS_LOCK; | 672 | info->access |= SNDRV_CTL_ELEM_ACCESS_LOCK; |
673 | if (vd->owner == ctl) | 673 | if (vd->owner == ctl) |
674 | info->access |= SNDRV_CTL_ELEM_ACCESS_OWNER; | 674 | info->access |= SNDRV_CTL_ELEM_ACCESS_OWNER; |
675 | info->owner = vd->owner_pid; | 675 | info->owner = vd->owner->pid; |
676 | } else { | 676 | } else { |
677 | info->owner = -1; | 677 | info->owner = -1; |
678 | } | 678 | } |
@@ -827,7 +827,6 @@ static int snd_ctl_elem_lock(struct snd_ctl_file *file, | |||
827 | result = -EBUSY; | 827 | result = -EBUSY; |
828 | else { | 828 | else { |
829 | vd->owner = file; | 829 | vd->owner = file; |
830 | vd->owner_pid = current->pid; | ||
831 | result = 0; | 830 | result = 0; |
832 | } | 831 | } |
833 | } | 832 | } |
@@ -858,7 +857,6 @@ static int snd_ctl_elem_unlock(struct snd_ctl_file *file, | |||
858 | result = -EPERM; | 857 | result = -EPERM; |
859 | else { | 858 | else { |
860 | vd->owner = NULL; | 859 | vd->owner = NULL; |
861 | vd->owner_pid = 0; | ||
862 | result = 0; | 860 | result = 0; |
863 | } | 861 | } |
864 | } | 862 | } |