From 16ccca11088c1bdd9311a2c630b453541305c48a Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 5 Nov 2019 16:18:50 +0100 Subject: ALSA: pci: Drop superfluous snd_pcm_sgbuf_ops_page snd_pcm_sgbuf_ops_page is no longer needed to be set explicitly to PCM page ops since the recent change in the PCM core (*). Leaving it NULL should work as long as the preallocation has been done properly. This patch drops the redundant lines. (*) 7e8edae39fd1: ALSA: pcm: Handle special page mapping in the default mmap handler Link: https://lore.kernel.org/r/20191105151856.10785-19-tiwai@suse.de Signed-off-by: Takashi Iwai --- sound/pci/via82xx.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'sound/pci/via82xx.c') diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c index 38601d0dfb73..902409dbc4c8 100644 --- a/sound/pci/via82xx.c +++ b/sound/pci/via82xx.c @@ -1363,7 +1363,6 @@ static const struct snd_pcm_ops snd_via686_playback_ops = { .prepare = snd_via686_playback_prepare, .trigger = snd_via82xx_pcm_trigger, .pointer = snd_via686_pcm_pointer, - .page = snd_pcm_sgbuf_ops_page, }; /* via686 capture callbacks */ @@ -1376,7 +1375,6 @@ static const struct snd_pcm_ops snd_via686_capture_ops = { .prepare = snd_via686_capture_prepare, .trigger = snd_via82xx_pcm_trigger, .pointer = snd_via686_pcm_pointer, - .page = snd_pcm_sgbuf_ops_page, }; /* via823x DSX playback callbacks */ @@ -1389,7 +1387,6 @@ static const struct snd_pcm_ops snd_via8233_playback_ops = { .prepare = snd_via8233_playback_prepare, .trigger = snd_via82xx_pcm_trigger, .pointer = snd_via8233_pcm_pointer, - .page = snd_pcm_sgbuf_ops_page, }; /* via823x multi-channel playback callbacks */ @@ -1402,7 +1399,6 @@ static const struct snd_pcm_ops snd_via8233_multi_ops = { .prepare = snd_via8233_multi_prepare, .trigger = snd_via82xx_pcm_trigger, .pointer = snd_via8233_pcm_pointer, - .page = snd_pcm_sgbuf_ops_page, }; /* via823x capture callbacks */ @@ -1415,7 +1411,6 @@ static const struct snd_pcm_ops snd_via8233_capture_ops = { .prepare = snd_via8233_capture_prepare, .trigger = snd_via82xx_pcm_trigger, .pointer = snd_via8233_pcm_pointer, - .page = snd_pcm_sgbuf_ops_page, }; -- cgit From 6974f8ad44946701779209cb03cd8c6b598c3342 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 5 Nov 2019 16:18:55 +0100 Subject: 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 --- sound/pci/via82xx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sound/pci/via82xx.c') diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c index 902409dbc4c8..30c817b6b635 100644 --- a/sound/pci/via82xx.c +++ b/sound/pci/via82xx.c @@ -419,7 +419,7 @@ static int build_via_table(struct viadev *dev, struct snd_pcm_substream *substre /* the start of each lists must be aligned to 8 bytes, * but the kernel pages are much bigger, so we don't care */ - if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci), + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &chip->pci->dev, PAGE_ALIGN(VIA_TABLE_SIZE * 2 * 8), &dev->table) < 0) return -ENOMEM; @@ -1454,7 +1454,7 @@ static int snd_via8233_pcm_new(struct via82xx *chip) init_viadev(chip, chip->capture_devno, VIA_REG_CAPTURE_8233_STATUS, 6, 1); snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, - snd_dma_pci_data(chip->pci), + &chip->pci->dev, 64*1024, VIA_MAX_BUFSIZE); err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, @@ -1478,7 +1478,7 @@ static int snd_via8233_pcm_new(struct via82xx *chip) init_viadev(chip, chip->capture_devno + 1, VIA_REG_CAPTURE_8233_STATUS + 0x10, 7, 1); snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, - snd_dma_pci_data(chip->pci), + &chip->pci->dev, 64*1024, VIA_MAX_BUFSIZE); err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, @@ -1521,7 +1521,7 @@ static int snd_via8233a_pcm_new(struct via82xx *chip) init_viadev(chip, chip->capture_devno, VIA_REG_CAPTURE_8233_STATUS, 6, 1); snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, - snd_dma_pci_data(chip->pci), + &chip->pci->dev, 64*1024, VIA_MAX_BUFSIZE); err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, @@ -1547,7 +1547,7 @@ static int snd_via8233a_pcm_new(struct via82xx *chip) init_viadev(chip, chip->playback_devno, 0x30, 3, 0); snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, - snd_dma_pci_data(chip->pci), + &chip->pci->dev, 64*1024, VIA_MAX_BUFSIZE); return 0; } @@ -1577,7 +1577,7 @@ static int snd_via686_pcm_new(struct via82xx *chip) init_viadev(chip, 1, VIA_REG_CAPTURE_STATUS, 0, 1); snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, - snd_dma_pci_data(chip->pci), + &chip->pci->dev, 64*1024, VIA_MAX_BUFSIZE); return 0; } -- cgit