From: Takashi Sakamoto Date: Tue, 10 Mar 2015 13:13:31 +0000 (+0900) Subject: ALSA: core: reduce stack usage related to snd_ctl_new() X-Git-Tag: omap-for-v4.1/fixes-rc1~130^2~6^2~43^2~19 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2225e79b9b03;p=pandora-kernel.git ALSA: core: reduce stack usage related to snd_ctl_new() The callers of snd_ctl_new() need to have 'struct snd_kcontrol' data, and pass the data as template. Then, the function allocates the structure data again and copy from the template. This is a waste of resources. Especially, the callers use large stack for the template. This commit removes a need of template for the function, thus, changes the prototype of snd_ctl_new(). Furthermore, this commit changes the code of callers, snd_ctl_new1() and snd_ctl_elem_add() for better shape. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai --- Reading git-diff-tree failed