]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: emu10k1: Reduce GFP_ATOMIC allocation
authorTakashi Iwai <tiwai@suse.de>
Mon, 9 Apr 2018 20:21:49 +0000 (22:21 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 16 Apr 2018 12:01:53 +0000 (14:01 +0200)
commit7100f2d1ed77379471468349c51fdf329d572b70
tree1f00290b7dfccef07b74a656bf66d08cd13440dc
parenteefc95f009a573261d0b5be773201cba21dc7ec7
ALSA: emu10k1: Reduce GFP_ATOMIC allocation

The emu10k1 fx8010 code allocates each irq resource dynamically and
links to the list at PCM trigger callback.  Due to the nature of
trigger callback, the allocation is done with GFP_ATOMIC, hence it
may fail more often.  Moreover, the irq resource isn't big at all, and
using the kmalloc for this won't save many bytes, either.

This patch removes the dynamic allocation and embeds the irq resource
into struct snd_emu10k1_fx8010_pcm.irq field instead of keeping a
pointer.  As a result, it simplifies the code and removes the
unnecessary GFP_ATOMIC usage.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/emu10k1.h
sound/pci/emu10k1/emufx.c
sound/pci/emu10k1/emupcm.c