11 Feb
2015
11 Feb
'15
11:37 a.m.
All of created user controls are locked before added to system. This may be against programmers or users expectation.
This commit adds a comment about this.
Signed-off-by: Takashi Sakamoto o-takashi@sakamocchi.jp --- sound/core/control.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/sound/core/control.c b/sound/core/control.c index 0baff92..19f9f4e 100644 --- a/sound/core/control.c +++ b/sound/core/control.c @@ -1255,8 +1255,11 @@ static int snd_ctl_elem_add(struct snd_ctl_file *file, return -ENOMEM; } _kctl->private_data = ue; + + /* Lock values in this user controls. */ for (idx = 0; idx < _kctl->count; idx++) _kctl->vd[idx].owner = file; + err = snd_ctl_add(card, _kctl); if (err < 0) return err;
--
2.1.0