From: Takashi Sakamoto Date: Mon, 9 Feb 2015 15:01:45 +0000 (+0900) Subject: ALSA: control: fix failure to return new numerical ID in 'replace' event data X-Git-Tag: firefly_0821_release~176^2~2367^2~7 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e6ff3840dc844027bc81d0490e7bc22d03598429;p=firefly-linux-kernel-4.4.55.git ALSA: control: fix failure to return new numerical ID in 'replace' event data In 'replace' event data, numerical ID of control is always invalid. This commit fix this bug so as the event data has renewed numerical ID for control. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai --- diff --git a/sound/core/control.c b/sound/core/control.c index 8aae6eaa3564..35324a8e83c8 100644 --- a/sound/core/control.c +++ b/sound/core/control.c @@ -440,6 +440,7 @@ add: 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++)