Commit 6974f8ad authored by Takashi Iwai's avatar Takashi Iwai
Browse files

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: default avatarTakashi Iwai <tiwai@suse.de>
parent 1a810436
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -633,7 +633,7 @@ snd_ad1889_pcm_init(struct snd_ad1889 *chip, int device)
	chip->csubs = NULL;

	snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
						snd_dma_pci_data(chip->pci),
					      &chip->pci->dev,
					      BUFFER_BYTES_MAX / 2,
					      BUFFER_BYTES_MAX);

+1 −1
Original line number Diff line number Diff line
@@ -1672,7 +1672,7 @@ static int snd_ali_pcm(struct snd_ali *codec, int device,
				desc->capture_ops);

	snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
					      snd_dma_pci_data(codec->pci),
					      &codec->pci->dev,
					      64*1024, 128*1024);

	pcm->info_flags = 0;
+2 −1
Original line number Diff line number Diff line
@@ -592,7 +592,8 @@ static int snd_als300_new_pcm(struct snd_als300 *chip)

	/* pre-allocation of buffers */
	snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
	snd_dma_pci_data(chip->pci), 64*1024, 64*1024);
					      &chip->pci->dev,
					      64*1024, 64*1024);
	return 0;
}

+2 −1
Original line number Diff line number Diff line
@@ -693,7 +693,8 @@ static int snd_als4000_pcm(struct snd_sb *chip, int device)
	snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_als4000_playback_ops);
	snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_als4000_capture_ops);

	snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci),
	snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
					      &chip->pci->dev,
					      64*1024, 64*1024);

	chip->pcm = pcm;
+2 −2
Original line number Diff line number Diff line
@@ -1325,7 +1325,7 @@ static int snd_card_asihpi_pcm_new(struct snd_card_asihpi *asihpi, int device)
	/*? do we want to emulate MMAP for non-BBM cards?
	Jack doesn't work with ALSAs MMAP emulation - WHY NOT? */
	snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
						snd_dma_pci_data(asihpi->pci),
					      &asihpi->pci->dev,
					      64*1024, BUFFER_BYTES_MAX);

	return 0;
Loading