diff mbox

[4/8] ALSA: control: add a comment about locking values after creating

Message ID 1423651052-19593-5-git-send-email-o-takashi@sakamocchi.jp (mailing list archive)
State New, archived
Headers show

Commit Message

Takashi Sakamoto Feb. 11, 2015, 10:37 a.m. UTC
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 mbox

Patch

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;