aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/rme9652/rme9652.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-11-05 16:18:54 +0100
committerTakashi Iwai <tiwai@suse.de>2019-11-06 15:47:43 +0100
commit1a810436a2eff372aa1a934fe4d1bef50bd9dac8 (patch)
tree7a3d2f36a9e7bc389586a0793fa17479f0a647ce /sound/pci/rme9652/rme9652.c
parentALSA: es1968: Avoid non-standard macro usage (diff)
downloadlinux-dev-1a810436a2eff372aa1a934fe4d1bef50bd9dac8.tar.xz
linux-dev-1a810436a2eff372aa1a934fe4d1bef50bd9dac8.zip
ALSA: rme: 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. Along with it, drop the unnecessary assignment before the snd_dma_alloc_pages() call and simplify by returning the error code directly. Link: https://lore.kernel.org/r/20191105151856.10785-23-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/rme9652/rme9652.c')
-rw-r--r--sound/pci/rme9652/rme9652.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sound/pci/rme9652/rme9652.c b/sound/pci/rme9652/rme9652.c
index 4c851f8dcaf8..ef5c2f8e17c7 100644
--- a/sound/pci/rme9652/rme9652.c
+++ b/sound/pci/rme9652/rme9652.c
@@ -279,12 +279,7 @@ static char channel_map_9636_ds[26] = {
static int snd_hammerfall_get_buffer(struct pci_dev *pci, struct snd_dma_buffer *dmab, size_t size)
{
- dmab->dev.type = SNDRV_DMA_TYPE_DEV;
- dmab->dev.dev = snd_dma_pci_data(pci);
- if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci),
- size, dmab) < 0)
- return -ENOMEM;
- return 0;
+ return snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &pci->dev, size, dmab);
}
static void snd_hammerfall_free_buffer(struct snd_dma_buffer *dmab, struct pci_dev *pci)