diff options
author | Takashi Iwai <tiwai@suse.de> | 2019-11-05 16:18:55 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-11-06 15:47:43 +0100 |
commit | 6974f8ad44946701779209cb03cd8c6b598c3342 (patch) | |
tree | 943cce5b437578317e42501fe19f6e9bba965d3b /sound/pci/emu10k1 | |
parent | 1a810436a2eff372aa1a934fe4d1bef50bd9dac8 (diff) |
ALSA: pci: Avoid non-standard macro usage
Pass the device pointer from the PCI pointer directly, instead of a
non-standard macro. The macro didn't give any better readability.
Link: https://lore.kernel.org/r/20191105151856.10785-24-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/emu10k1')
-rw-r--r-- | sound/pci/emu10k1/emu10k1.c | 5 | ||||
-rw-r--r-- | sound/pci/emu10k1/emu10k1x.c | 6 | ||||
-rw-r--r-- | sound/pci/emu10k1/emufx.c | 2 | ||||
-rw-r--r-- | sound/pci/emu10k1/emupcm.c | 10 | ||||
-rw-r--r-- | sound/pci/emu10k1/memory.c | 4 | ||||
-rw-r--r-- | sound/pci/emu10k1/p16v.c | 4 |
6 files changed, 16 insertions, 15 deletions
diff --git a/sound/pci/emu10k1/emu10k1.c b/sound/pci/emu10k1/emu10k1.c index f208b6e217fd..29b7720d7961 100644 --- a/sound/pci/emu10k1/emu10k1.c +++ b/sound/pci/emu10k1/emu10k1.c @@ -124,8 +124,9 @@ static int snd_card_emu10k1_probe(struct pci_dev *pci, goto error; /* This stores the periods table. */ if (emu->card_capabilities->ca0151_chip) { /* P16V */ - if ((err = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), - 1024, &emu->p16v_buffer)) < 0) + err = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &pci->dev, + 1024, &emu->p16v_buffer); + if (err < 0) goto error; } diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c index 9cf81832259c..241b4a0631ab 100644 --- a/sound/pci/emu10k1/emu10k1x.c +++ b/sound/pci/emu10k1/emu10k1x.c @@ -877,7 +877,7 @@ static int snd_emu10k1x_pcm(struct emu10k1x *emu, int device) emu->pcm = pcm; snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, - snd_dma_pci_data(emu->pci), + &emu->pci->dev, 32*1024, 32*1024); return snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, map, 2, @@ -936,8 +936,8 @@ static int snd_emu10k1x_create(struct snd_card *card, } chip->irq = pci->irq; - if(snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), - 4 * 1024, &chip->dma_buffer) < 0) { + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &pci->dev, + 4 * 1024, &chip->dma_buffer) < 0) { snd_emu10k1x_free(chip); return -ENOMEM; } diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c index e053f0d58bdd..a31adecfe608 100644 --- a/sound/pci/emu10k1/emufx.c +++ b/sound/pci/emu10k1/emufx.c @@ -2464,7 +2464,7 @@ int snd_emu10k1_fx8010_tram_setup(struct snd_emu10k1 *emu, u32 size) } if (size > 0) { - if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(emu->pci), + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &emu->pci->dev, size * 2, &emu->fx8010.etram_pages) < 0) return -ENOMEM; memset(emu->fx8010.etram_pages.area, 0, size * 2); diff --git a/sound/pci/emu10k1/emupcm.c b/sound/pci/emu10k1/emupcm.c index 46d8768adc01..9a8cf3c7dd67 100644 --- a/sound/pci/emu10k1/emupcm.c +++ b/sound/pci/emu10k1/emupcm.c @@ -1412,12 +1412,12 @@ int snd_emu10k1_pcm(struct snd_emu10k1 *emu, int device) for (substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; substream; substream = substream->next) snd_pcm_lib_preallocate_pages(substream, SNDRV_DMA_TYPE_DEV_SG, - snd_dma_pci_data(emu->pci), + &emu->pci->dev, 64*1024, 64*1024); for (substream = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream; substream; substream = substream->next) snd_pcm_lib_preallocate_pages(substream, SNDRV_DMA_TYPE_DEV, - snd_dma_pci_data(emu->pci), + &emu->pci->dev, 64*1024, 64*1024); return 0; @@ -1443,7 +1443,7 @@ int snd_emu10k1_pcm_multi(struct snd_emu10k1 *emu, int device) for (substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; substream; substream = substream->next) snd_pcm_lib_preallocate_pages(substream, SNDRV_DMA_TYPE_DEV_SG, - snd_dma_pci_data(emu->pci), + &emu->pci->dev, 64*1024, 64*1024); return 0; @@ -1478,7 +1478,7 @@ int snd_emu10k1_pcm_mic(struct snd_emu10k1 *emu, int device) emu->pcm_mic = pcm; snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, - snd_dma_pci_data(emu->pci), + &emu->pci->dev, 64*1024, 64*1024); return 0; @@ -1853,7 +1853,7 @@ int snd_emu10k1_pcm_efx(struct snd_emu10k1 *emu, int device) return err; snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, - snd_dma_pci_data(emu->pci), + &emu->pci->dev, 64*1024, 64*1024); return 0; diff --git a/sound/pci/emu10k1/memory.c b/sound/pci/emu10k1/memory.c index 135e26544275..94b8d5b08225 100644 --- a/sound/pci/emu10k1/memory.c +++ b/sound/pci/emu10k1/memory.c @@ -387,7 +387,7 @@ int snd_emu10k1_alloc_pages_maybe_wider(struct snd_emu10k1 *emu, size_t size, } return snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, - snd_dma_pci_data(emu->pci), size, dmab); + &emu->pci->dev, size, dmab); } /* @@ -477,7 +477,7 @@ static void __synth_free_pages(struct snd_emu10k1 *emu, int first_page, int page; dmab.dev.type = SNDRV_DMA_TYPE_DEV; - dmab.dev.dev = snd_dma_pci_data(emu->pci); + dmab.dev.dev = &emu->pci->dev; for (page = first_page; page <= last_page; page++) { if (emu->page_ptr_table[page] == NULL) diff --git a/sound/pci/emu10k1/p16v.c b/sound/pci/emu10k1/p16v.c index eeaed555185c..ab8876855989 100644 --- a/sound/pci/emu10k1/p16v.c +++ b/sound/pci/emu10k1/p16v.c @@ -643,7 +643,7 @@ int snd_p16v_pcm(struct snd_emu10k1 *emu, int device) substream; substream = substream->next) { snd_pcm_lib_preallocate_pages(substream, SNDRV_DMA_TYPE_DEV, - snd_dma_pci_data(emu->pci), + &emu->pci->dev, (65536 - 64) * 8, (65536 - 64) * 8); /* @@ -656,7 +656,7 @@ int snd_p16v_pcm(struct snd_emu10k1 *emu, int device) substream; substream = substream->next) { snd_pcm_lib_preallocate_pages(substream, SNDRV_DMA_TYPE_DEV, - snd_dma_pci_data(emu->pci), + &emu->pci->dev, 65536 - 64, 65536 - 64); /* dev_dbg(emu->card->dev, |