From: Takashi Sakamoto Date: Sun, 8 Feb 2015 13:39:44 +0000 (+0900) Subject: ALSA: control: fix failure to return numerical ID in 'add' event X-Git-Tag: v4.0-rc1~129^2~14 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=d34890cf4113397625a6629d71749fa638a7a734;p=linux.git ALSA: control: fix failure to return numerical ID in 'add' event Currently when adding a new control, the assigned numerical ID is not set for event data, thus userspace applications cannot realize it just by event data. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai --- diff --git a/sound/core/control.c b/sound/core/control.c index 60caba1f2211..8aae6eaa3564 100644 --- a/sound/core/control.c +++ b/sound/core/control.c @@ -373,6 +373,7 @@ int snd_ctl_add(struct snd_card *card, struct snd_kcontrol *kcontrol) card->controls_count += kcontrol->count; kcontrol->id.numid = card->last_numid + 1; card->last_numid += kcontrol->count; + id = kcontrol->id; count = kcontrol->count; up_write(&card->controls_rwsem); for (idx = 0; idx < count; idx++, id.index++, id.numid++)