diff options
author | Takashi Iwai <tiwai@suse.de> | 2019-02-01 12:14:53 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-02-01 17:16:40 +0100 |
commit | 0b6a2c9cf4a00f54a0916499ece8a5cf3cced385 (patch) | |
tree | 675b07d3e0b4b06c835cacdc42e3fc1ad6c801bf /sound/isa/gus | |
parent | ALSA: mips: pass struct device to DMA API functions (diff) | |
download | linux-0b6a2c9cf4a00f54a0916499ece8a5cf3cced385.tar.xz linux-0b6a2c9cf4a00f54a0916499ece8a5cf3cced385.zip |
ALSA: isa: Avoid passing NULL to memory allocators
We used to pass NULL to memory allocators for ISA devices due to
historical reasons. But we prefer rather a proper device object to be
assigned, so let's fix it by replacing snd_dma_isa_data() call with
card->dev reference, and kill snd_dma_isa_data() definition.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa/gus')
-rw-r--r-- | sound/isa/gus/gus_pcm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/isa/gus/gus_pcm.c b/sound/isa/gus/gus_pcm.c index 131b28997e1d..b9efc6dff45d 100644 --- a/sound/isa/gus/gus_pcm.c +++ b/sound/isa/gus/gus_pcm.c @@ -891,7 +891,7 @@ int snd_gf1_pcm_new(struct snd_gus_card *gus, int pcm_dev, int control_index) for (substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; substream; substream = substream->next) snd_pcm_lib_preallocate_pages(substream, SNDRV_DMA_TYPE_DEV, - snd_dma_isa_data(), + card->dev, 64*1024, gus->gf1.dma1 > 3 ? 128*1024 : 64*1024); pcm->info_flags = 0; @@ -901,7 +901,7 @@ int snd_gf1_pcm_new(struct snd_gus_card *gus, int pcm_dev, int control_index) if (gus->gf1.dma2 == gus->gf1.dma1) pcm->info_flags |= SNDRV_PCM_INFO_HALF_DUPLEX; snd_pcm_lib_preallocate_pages(pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream, - SNDRV_DMA_TYPE_DEV, snd_dma_isa_data(), + SNDRV_DMA_TYPE_DEV, card->dev, 64*1024, gus->gf1.dma2 > 3 ? 128*1024 : 64*1024); } strcpy(pcm->name, pcm->id); |