diff options
author | Takashi Iwai <tiwai@suse.de> | 2018-04-09 22:21:49 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-04-16 14:01:53 +0200 |
commit | 057666b69b1d51feb389a17ec73722b001aaf3d0 (patch) | |
tree | 1f00290b7dfccef07b74a656bf66d08cd13440dc /sound/pci/emu10k1/emupcm.c | |
parent | ALSA: cmipci: Allocate with GFP_KERNEL instead of GFP_ATOMIC (diff) | |
download | linux-057666b69b1d51feb389a17ec73722b001aaf3d0.tar.xz linux-057666b69b1d51feb389a17ec73722b001aaf3d0.zip |
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>
Diffstat (limited to 'sound/pci/emu10k1/emupcm.c')
-rw-r--r-- | sound/pci/emu10k1/emupcm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/emu10k1/emupcm.c b/sound/pci/emu10k1/emupcm.c index cefe613ef7b7..d39458ab251f 100644 --- a/sound/pci/emu10k1/emupcm.c +++ b/sound/pci/emu10k1/emupcm.c @@ -1724,7 +1724,7 @@ static int snd_emu10k1_fx8010_playback_trigger(struct snd_pcm_substream *substre case SNDRV_PCM_TRIGGER_STOP: case SNDRV_PCM_TRIGGER_PAUSE_PUSH: case SNDRV_PCM_TRIGGER_SUSPEND: - snd_emu10k1_fx8010_unregister_irq_handler(emu, pcm->irq); pcm->irq = NULL; + snd_emu10k1_fx8010_unregister_irq_handler(emu, &pcm->irq); snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 0); pcm->tram_pos = INITIAL_TRAM_POS(pcm->buffer_size); pcm->tram_shift = 0; |