summaryrefslogtreecommitdiff
path: root/sound/core/sgbuf.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-05-22 17:43:04 +0200
committerTakashi Iwai <tiwai@suse.de>2017-05-23 07:03:55 +0200
commit53e7bf452584e73df8a529a2b157a1225a52637f (patch)
tree697697b2c5ccd436f4c801458025a21c757c6b43 /sound/core/sgbuf.c
parenta02cb8f8def634159b60c3a4d6ba16e471b46e0c (diff)
ALSA: control: Simplify snd_ctl_elem_list() implementation
This patch simplifies the code of snd_ctl_elem_list() in the following ways: - Avoid a vmalloc() temporary buffer but do copy in each iteration; the vmalloc buffer was introduced at the time we took the spinlock for the ctl element management. - Use the standard list_for_each_entry() macro - Merge two loops into one; it used to be a loop for skipping until offset becomes zero and another loop to copy the data. They can be folded into a single loop easily. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Tested-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/sgbuf.c')
0 files changed, 0 insertions, 0 deletions