ALSA: ctl: fill identical information to return value when adding userspace elements
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Sat, 11 Apr 2015 08:41:04 +0000 (17:41 +0900)
committerTakashi Iwai <tiwai@suse.de>
Sat, 11 Apr 2015 15:35:17 +0000 (17:35 +0200)
commitcab2ed7474bffafd2a68a885e03b85526194abcd
treea9e1e2008fec076254277095f21f3b947e52c423
parentc378c3b03c8d6eef2d2600d0279e2c718d6a0a44
ALSA: ctl: fill identical information to return value when adding userspace elements

currently some members related identical information are not fiiled
in returned parameter of SNDRV_CTL_IOCTL_ELEM_ADD. This is not better
for userspace application.

This commit copies information to returned value. When failing to copy
into userspace, the added elements are going to be removed. Then, no
applications can lock these elements between adding and removing because
these are already locked.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/control.c