Skip to content

Commit

Permalink
ALSA: emu10k1: use dma_set_mask_and_coherent()
Browse files Browse the repository at this point in the history
We have been calling dma_set_mask() and then dma_set_coherent_mask() with
the same value, but there is a dma_set_mask_and_coherent() function that
does exactly that so let's use it instead.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Maciej S. Szmigiero authored and Takashi Iwai committed Feb 14, 2018
1 parent a4463c9 commit 70d0bc7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sound/pci/emu10k1/emu10k1_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1871,8 +1871,7 @@ int snd_emu10k1_create(struct snd_card *card,
emu->address_mode = is_audigy ? 0 : 1;
/* set the DMA transfer mask */
emu->dma_mask = emu->address_mode ? EMU10K1_DMA_MASK : AUDIGY_DMA_MASK;
if (dma_set_mask(&pci->dev, emu->dma_mask) < 0 ||
dma_set_coherent_mask(&pci->dev, emu->dma_mask) < 0) {
if (dma_set_mask_and_coherent(&pci->dev, emu->dma_mask) < 0) {
dev_err(card->dev,
"architecture does not support PCI busmaster DMA with mask 0x%lx\n",
emu->dma_mask);
Expand Down

0 comments on commit 70d0bc7

Please sign in to comment.