aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/control.h
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2009-11-02 03:35:44 -0500
committerTakashi Iwai <tiwai@suse.de>2009-11-06 08:32:06 -0500
commit25d27eded1f4fc728e64f443adc339b5229be5d7 (patch)
treeb738266467fc0f85d9f7f29e439dfff8e33da4c0 /include/sound/control.h
parent31cef7076ed9409a33f19ea372d6dc5fdefe27ae (diff)
control: use reference-counted pid
Instead of storing the PID number, take a reference to the task's pid structure. This protects against duplicates due to PID overflows, and using pid_vnr() ensures that the PID returned by snd_ctl_elem_info() is correct as seen from the current namespace. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound/control.h')
-rw-r--r--include/sound/control.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/sound/control.h b/include/sound/control.h
index 3517745d0a2d..112374dc0c58 100644
--- a/include/sound/control.h
+++ b/include/sound/control.h
@@ -86,10 +86,12 @@ struct snd_kctl_event {
86 86
87#define snd_kctl_event(n) list_entry(n, struct snd_kctl_event, list) 87#define snd_kctl_event(n) list_entry(n, struct snd_kctl_event, list)
88 88
89struct pid;
90
89struct snd_ctl_file { 91struct snd_ctl_file {
90 struct list_head list; /* list of all control files */ 92 struct list_head list; /* list of all control files */
91 struct snd_card *card; 93 struct snd_card *card;
92 pid_t pid; 94 struct pid *pid;
93 int prefer_pcm_subdevice; 95 int prefer_pcm_subdevice;
94 int prefer_rawmidi_subdevice; 96 int prefer_rawmidi_subdevice;
95 wait_queue_head_t change_sleep; 97 wait_queue_head_t change_sleep;